Fekzen Posted July 9, 2016 Share Posted July 9, 2016 (edited) Hi folks, I am working my 4th day of trying to updage from 1.4 to 1.6. When the 1-click didnt work I had to make it manuallt and the shop crashed. Now I have a new install of the 1.6 and I did change back to the old SQL DB. Everythings seems to work fine in Backoffice but when entiering the shop - I get the Server Error 500. I get this answere when I run debug mode: Unknown column 'gs.name' in 'field list' SELECT gs.*, s.*, gs.name AS group_name, s.name AS shop_name, s.active, su.domain, su.domain_ssl, su.physical_uri, su.virtual_uri FROM ps_shop_group gs LEFT JOIN ps_shop s ON s.id_shop_group = gs.id_shop_group LEFT JOIN ps_shop_url su ON s.id_shop = su.id_shop AND su.main = 1 WHERE s.deleted = 0 AND gs.deleted = 0 ORDER BY gs.name, s.name Any Ideas how to solve it? I am in desperate need of opening the shop again otherwise I have to use an other solution if I cant get this to work now soon. RgdsAndreas Edited July 9, 2016 by Fekzen (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted July 9, 2016 Share Posted July 9, 2016 You cannot run a 1.6 shop on a 1.4 database. The database structure is much too different - mostly because with 1.5 Prestashop became multi-shop and added tables like ps_product_shop. For the same reason you cannot use any 1.4 theme in Prestashop 1.6 and you should test all your modules very carefully before you re-activate them under 1.6. If a straight upgrade doesn't work you can use my tool copy_shop: https://www.prestashop.com/forums/topic/445453-copy-shopdata-script-for-copying-shop-content-for-upgrade/ Take your time to read its manual. Even if you don't use the tool you will find its information useful. Link to comment Share on other sites More sharing options...
Fekzen Posted July 10, 2016 Author Share Posted July 10, 2016 Thanks for a quick reply! I will start now by trying to import my DB backup tables from the old 1.4 into the new 1.6 (cause my old shop isnt accessable anymore now I only have the database backup). Do you think that may work? I mean it looks like the actual DB backup contains tables with my info in it. So I did just change prefix of all the tables to the new prefix I am using in the 1.6 installation. And I will let my webhosting provider import the new DB backup with old info and new prefix. Or do you think I should start by try using your tool? Since now I have an 1.6 installation with new prefix working - but none of my products in it , and when I change back to old prefix I can view all my products in backoffice and everything looks fine, but I cant access front office. Thats why I think it may work importing an old DB backup into the new database prefix...? Rgds A Link to comment Share on other sites More sharing options...
Fekzen Posted July 10, 2016 Author Share Posted July 10, 2016 Also, I couldnt find the copyshop attached script on your link. Is it possible to copy all nececery tables from one "prefix" to an other "prefix" that would probably solve my problem. I can manage to fix the rest by myself but all the text in every product would be great if it was possible to move over. Please attach the script files and a short disctription on how to use them, cause I aint working with SQL normally so I only know it briefly. Many thanks! Rgds Andreas Link to comment Share on other sites More sharing options...
musicmaster Posted July 10, 2016 Share Posted July 10, 2016 For some reason the script had disappeared. I have put it back. It is unclear to me what you want with another prefix. I doubt that is a useful approach. Anyway, I have added a small script that can - in combination with Prestools - be used for renaming the prefix. rename_prefix.php Link to comment Share on other sites More sharing options...
Fekzen Posted July 11, 2016 Author Share Posted July 11, 2016 Hi again, The new prefix is used due to when I installed the new prestashop it detected that ps_ was already used so thats why I now use ps2_. I get this error when trying to use the script , on every table in the database: MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '166850-shop.ps_paypal_customer SELECT `id_paypal_customer`,`id_customer`,`paypal' at line 1 Generated by Query 'INSERT INTO 166850-shop.ps_paypal_customer SELECT `id_paypal_customer`,`id_customer`,`paypal_email` FROM 166850-shop.ps_paypal_customer' Any ideas of what it could be? Thanks in advance! A Link to comment Share on other sites More sharing options...
Fekzen Posted July 11, 2016 Author Share Posted July 11, 2016 You dont have any tool that makes it possible to restore an old Prestashop 1.4 DB backup into a new Prestashop 1.6 DB? I mean if I have the backup files only. That would probably be more easy than running scripts which generates errors. Link to comment Share on other sites More sharing options...
musicmaster Posted July 11, 2016 Share Posted July 11, 2016 You dont have any tool that makes it possible to restore an old Prestashop 1.4 DB backup into a new Prestashop 1.6 DB? I mean if I have the backup files only. That would probably be more easy than running scripts which generates errors. Bonus points for your cynicism. The problem is in your server name "166850-shop.ps_paypal_customer". Due to the minus sign this name needs to be surrounded by backticks (`). I don't see much use for renaming. The best you can do is to install a fresh version of your Prestashop 1.4 version. Point that instead of its own database to your backup database. And then upgrade that. Link to comment Share on other sites More sharing options...
Fekzen Posted July 12, 2016 Author Share Posted July 12, 2016 hehe, when I read my answere now I see it sounds like a child but that wasnt what I actually ment - just that I aint good at this scripts which makes me a bit affraid of them , but editing files is what I do so that makes more sence to me I will give it a try fixing the name issue. What happens when I run the script, it saves a copy of the database and then I import it into the new installed 1.6 later? Thanks in advance! Andreas Link to comment Share on other sites More sharing options...
Fekzen Posted July 13, 2016 Author Share Posted July 13, 2016 Hi again, Do you mean I should put it like this in the config file? define('_OLD_NAME_', '`166850-shop`'); When I do so, it cant find the database, I get this message: Error selecting database Thanks in advance! Andreas Link to comment Share on other sites More sharing options...
musicmaster Posted July 14, 2016 Share Posted July 14, 2016 Can you try the attached file? copy_shopdata_functions.inc.php 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