danielsaar Posted October 27, 2021 Share Posted October 27, 2021 Hi all, my installation is in domain.de/folder1 and I made a complete copy of it to domain.de/folder2 The DB - Parameters I changed for the DB-copy. But if I open domain.de/folder2 in the browser I come to domain.de/folder1 Where in the DB or else I have to change something? An no! I can not loggin into the Backend, because the URL directly goes to folder1. In the .htaccess I find nothing about /folder1 Is where any field in the DB I have to change? And yes! I deleted the var/cache Folder. yours Daniel Link to comment Share on other sites More sharing options...
Rhobur Posted October 28, 2021 Share Posted October 28, 2021 For the DB-copy you need to make sure the physical_uri in the ps_shop_url table points to /folder2/ insted of the /folder1/ Then you can remove .htaccess from the /folder2 and PS will recreate it correctly on the subsequient start. Or, instead of removing look for the line, RewriteRule . - [E=REWRITEBASE:/folder1/] and replace it with RewriteRule . - [E=REWRITEBASE:/folder2/] 1 Link to comment Share on other sites More sharing options...
danielsaar Posted October 28, 2021 Author Share Posted October 28, 2021 Thanks Ambassadors, Oh, the images are with absolut-path?! Its like in wordpress Ambassadors, have you a tipp, there I smart can change the path of the images? Probably I need a UPDATE to a table?! yours, Daniel Link to comment Share on other sites More sharing options...
danielsaar Posted October 28, 2021 Author Share Posted October 28, 2021 Hi all, Presta (my deep love) Why I made a copy of my page? I made a copy to run in the module "1 click backup" the return to an older Version-Function. I had two Folder dev and dev2 Also the parameter.php was different, because I had a copy of the original dev-DB für my dev2- version. After I used the the Module-Function dev2 do not work (500 server error) and dev not work. In dev I get "Fatal error: Uncaught Unknown column 'active' in 'field list' SELECT active FROM `pswo_hook` h WHERE (h.name = "moduleRoutes") LIMIT 1 .../htdocs/dev/classes/db/Db.php on line 769" Probably the Modul do not work correct. I also do not understand, why dev is not working as I run the modul in dev2. The only thing I know is, that there is the ps_shop_url table to set the Shop-Url. In the .htaccess is nothing about any dev-thing. For me this means, that I need to start by Zero. My confidence in the stability of Presta is shaken. That is a great pity. I hope in the futur the systems does not behave like try and error or searching for the needle in the haystack. works, works not, works, works not, works .... like a coin toss. Ok, I try again... yours Daniel Link to comment Share on other sites More sharing options...
JulienPct Posted October 28, 2021 Share Posted October 28, 2021 (edited) Hi, Migrating a website to PrestaShop is quite simple. You just have to : - copy the files located in a folder X and paste them in a folder Y. - change the connection parameters to the database located in the parameters.php file - change the address of the site in the database : ps_shop_url - if ever it is a local copy, then remove the SSL in the database : ps_ssl_enabled - delete the htaccess file And here is the site migrated. Then for the images, the best is to use PrestaShop variables in the sources like for example : {$urls.base_url} Edited October 28, 2021 by JulienPct (see edit history) Link to comment Share on other sites More sharing options...
danielsaar Posted October 28, 2021 Author Share Posted October 28, 2021 (edited) Hi JulienPct, I did it in the way you wrote. The Produkt-Images in my dev2 - Version I could not see, because in the img-url was something with dev and not dev2. You write nothing about changing any table with image-urls. This means, that the url of the images are relativ - is this correct? In the BO of my dev2-Version in an article I could see the product-image, but in the FrontEnd not. To make the copy was not the big thing (only I had problems to see the fotos in the frontend). The Problem was to use the Module "1 click upgrade". I used it to go back from 1.7.8 to 1.7.7 as the 8-version made a lot of stress. After I clicked I had only a page with read writings about DB-problems. Also, the dev-version was defect. I can not understand it. Because the parameters.php I changed in the dev2 - Version. I checked this by changing a produkt name. In dev it was the old name, in dev2 the name I changed. So I knew, that I am working in the copied DB. It could be this: If the 1 click upgrade makes an "return" to older Version, it also will set the url in the ps_shop_url back to the old (dev) one. I dont know. Probably there is a kind of DB-history-table. The module takes the data from there and change all table-data to this old-data. I dont know how the Modules makes an "return to older Version". yours Daniel Edited October 28, 2021 by danielsaar (see edit history) Link to comment Share on other sites More sharing options...
JulienPct Posted October 28, 2021 Share Posted October 28, 2021 If I understood correctly, you have a site on dev1 in 1.7.8, you copied it to dev2 and then downgraded it to dev2? If yes, then why didn't you do it on dev 1 when PrestaShop backups are, in my opinion, quite well done. Going back to the images, when you inspect the code, the image source link is something like: /dev1/image.png? Link to comment Share on other sites More sharing options...
danielsaar Posted October 28, 2021 Author Share Posted October 28, 2021 (edited) "If I understood correctly, you have a site on dev1 in 1.7.8, you copied it to dev2 and then downgraded it to dev2?" I wanted downgrade the kopie (in folder dev2) to the Version 1.7.7. I made the copie to work on the copy (dev2) and not on the original (dev1). "Going back to the images, when you inspect the code, the image source link is something like: /dev1/image.png?" Yes, on the dev2-version I had a string "dev1" in the source-link. That was the reason, I thought that presta use absolut source-links insead of relative. yours, Daniel Edited October 28, 2021 by danielsaar (see edit history) Link to comment Share on other sites More sharing options...
JulienPct Posted October 28, 2021 Share Posted October 28, 2021 21 minutes ago, danielsaar said: I made the copie to work on the copy (dev2) and not on the original (dev1). I think you should make a backup of dev1 that you put aside, you downgrade to dev1 (in the worst case you have a copy). You migrate this new downgraded dev1 into dev2 as explained. And, you put dev1 back to 1.7.8 or you will use your copy. 25 minutes ago, danielsaar said: Yes, on the dev2-version I had a string "dev1" in the source-link. That was the reason, I thought that presta use absolut source-links insead of relative. Did you find the code of these images, are the sources of these images links or variables? Link to comment Share on other sites More sharing options...
danielsaar Posted October 28, 2021 Author Share Posted October 28, 2021 Hi JulienPct, I sad that I made the downgrade on one system (here it was the Presta in Folder /dev2). But 1) the downgrade doesn't work 2) It destroyd also the Presta-Version in Folder /dev1 Point 2 is maximum stupid. The Question is, why a completely different system crashes a nother Presta-Installation. yours, Daniel Link to comment Share on other sites More sharing options...
JulienPct Posted October 29, 2021 Share Posted October 29, 2021 15 hours ago, danielsaar said: I sad that I made the downgrade on one system (here it was the Presta in Folder /dev2). Was dev2 working after the migration from dev1 to dev2 but before the version downgrade? Link to comment Share on other sites More sharing options...
danielsaar Posted October 29, 2021 Author Share Posted October 29, 2021 Yes. After I made a copy from Presta in folder dev1 to the folder dev2 I first checked it: I changed some product-names in the Presta in Folder dev2. When I compared the product of both Prestas in folder dev1 and dev2. The product in dev2 had my changings, the Presta in dev1 not. So I knew, the dev2-Persta was connected with the DB-2. (And Pesta in dev1 with the own DB-1) When I logged in Presta Version in dev2 and run the downgrade-Module. On the End both Pestas were destroyed. 1 Link to comment Share on other sites More sharing options...
musicmaster Posted October 29, 2021 Share Posted October 29, 2021 On 10/28/2021 at 2:29 PM, JulienPct said: If yes, then why didn't you do it on dev 1 when PrestaShop backups are, in my opinion, quite well done. On the contrary. Technically it is ok. But the forum is full of reports of people who tried to roll back their upgrade and found their installation crashed. I see two issues not mentioned: - after moving a shop you should delete the cache. This should be the first thing you do when you login the new backoffice. - in general Prestashop doesn't maintain absolute links. But I have seen some menu programs that do use them. But that is only a front side problem. On 10/28/2021 at 5:30 PM, danielsaar said: 2) It destroyd also the Presta-Version in Folder /dev1 I have never heard that before. You talk about "destroyed", That is a rather vague term. An error message would be more helpful. Prestools contains a tool with which you can restore a Prestashop backup database into a new database. It is free. Link to comment Share on other sites More sharing options...
danielsaar Posted November 3, 2021 Author Share Posted November 3, 2021 Hi musicmaster, I deleted the cache - folder. "destroyed", is really a vague term It didnt destroy. The only point was, that the Presta in the Folder dev1 was full of errors. I couldn't login anymore. (front and BO). yours Daniel Link to comment Share on other sites More sharing options...
JulienPct Posted November 3, 2021 Share Posted November 3, 2021 What is the error with the debug mode that appears on dev1? Link to comment Share on other sites More sharing options...
danielsaar Posted November 16, 2021 Author Share Posted November 16, 2021 Hi JulienPct, I deleted this Version and started by zero. yours Daniel Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now