Herbalife Posted April 29, 2013 Share Posted April 29, 2013 (edited) Hi. I've just upgraded to 1.5.4.1 for a client, and the menus on the BO are now extended and overlapping. i had this on my own website a few weeks ago when upgrading 1.5.4, so did a clean install which worked, but I've edited 100's of files within this clients' site so can't afford to start afresh. Any suggestions would be greatly appreciated thanks. *Image attached So, I restored the back up I took before the upgrade, and now the site is down completely, with the error "Bad SubDomain SQL query." Please can someone help? Edited April 29, 2013 by Herbalife (see edit history) Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 So, I restored the back up I took before the upgrade, and now the site is down completely, with the error "Bad SubDomain SQL query." Please can someone help? Link to comment Share on other sites More sharing options...
Rhapsody Posted April 29, 2013 Share Posted April 29, 2013 You may be too late for this since you rolled back, but ctrl F5 would clear your browser cache and probably fix the menus overlapping. Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 Hi Rhapsody. Thanks but I already tried that I'm now totally stuck! Link to comment Share on other sites More sharing options...
benjamin utterback Posted April 29, 2013 Share Posted April 29, 2013 Hi Herbalife, how did you restore the backup? Could you tell us the process you took? Thank you! Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 Hi Benjamin. I'm sooo pleased to see you here...thank you The BO was as in the thumbnail image above, so > '1 click upgrade' > rollback. Link to comment Share on other sites More sharing options...
benjamin utterback Posted April 29, 2013 Share Posted April 29, 2013 Hi Herbalife, no problem. The problem is coming from some database changes that did not change back when you "rolled back" do you have a backup of your SQL database and PrestaShop files/folders? Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 (edited) Oh no...no I don't. I just took the standard back-up when installing the upgrade. I've got that back-up zipped on my local drive if that helps? Edited April 29, 2013 by Herbalife (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted April 29, 2013 Share Posted April 29, 2013 Hi Herbalife, it may be a good idea to ask your hosting and see if they have a backup of your SQL database. Please make sure to follow the upgrade instructions found in the documentation. http://doc.prestashop.com/display/PS15/Automatic+update Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 Hi Benjamin. Ok, I'll try them thank you. I use Heart Internet. If that's a no-go, do you have any other suggestions please? Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 Hi Benjamin. I have no backup of my SQL database Is there any way to try to go back to 1.5.4.1 upgrade please? Link to comment Share on other sites More sharing options...
benjamin utterback Posted April 29, 2013 Share Posted April 29, 2013 Hi Herbalife, Was this an upgrade from 1.4? Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 Yes it was Link to comment Share on other sites More sharing options...
benjamin utterback Posted April 29, 2013 Share Posted April 29, 2013 Hi Herbalife, if you are comfortable accessing your PrestaShop files, you can try the steps found in this tutorial. http://www.reboot.ro/tutorials/how-to-solve-bad-subdomain-sql-query-on-prestashop-update-from-1-4-x-to-1-5-x/ Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 Thank you..I'll try that and see how I get on. It looks as though this might be my only option! Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 It hasn;t worked I'm getting the following 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 ''ps_subdomain' ( 'id_subdomain' int(10) unsigned NOT NULL auto_increment, ' at line 1 Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 I've tried the delimiter as both ',' and ';' but no joy...same error message Link to comment Share on other sites More sharing options...
benjamin utterback Posted April 29, 2013 Share Posted April 29, 2013 Okay, once you changed the values to how they originally were, try this! http://forge.prestashop.com/browse/PSCFI-2916 Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 Thanks. Now i'm getting this: #1146 - Table 'web239-a-pres-3.ps_subdomain' doesn't exist Link to comment Share on other sites More sharing options...
benjamin utterback Posted April 29, 2013 Share Posted April 29, 2013 Hi, hmm okay. You changed all the values to how they originally were, before you made the additional changes right? Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 Could I delete Prestashop, fresh install 1.5.4.1 then restore from my 1.4 backup? Or would i lose all of my previous formating please? You mean the delimiter? Sorry...I've not wokred on sql before Link to comment Share on other sites More sharing options...
benjamin utterback Posted April 29, 2013 Share Posted April 29, 2013 Hi, I was asking if you made sure to change back the values you changed in myPHP (did not work) No, you will not be able to use you 1.4 files into a fresh install of 1.5.4.1 Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 Hi. The only thing I changed in myPhp was the delimiter to see if that worked. I really have no idea where to even start now. What if I delete everything and do a fresh install of 1.4 from the cp, then restore the backup? However, I have no sql backup, so I don't think that would work? Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 Hi Benjamin. I found an old sql database that I restored, then kept the _subdomain, dropped the rest, then imported my post 1.5 back up sql to. I now have the header of the site, but nothing else. Please see www.decadent-vapours.com I don't know how to restore this back to functionality though. The categories, products, etc are all in the BO, but my url states /en/ which I guess is where the problem lies? Link to comment Share on other sites More sharing options...
tdr170 Posted April 29, 2013 Share Posted April 29, 2013 (edited) O Edited April 29, 2013 by tdr170 (see edit history) Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 Hi tdr170. Thank you for that. I managed to restore an old _subdomain file and get the site back up and running, but I now have no products in my categories, so shall I try dropping the ps_subdomain tab, and then creating the one you've mentioned above please? Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 My ps_subdomain file content: SELECT * FROM `ps_subdomain` WHERE 1 I guess there is something missing here which is causing the products not to appear? Please can anyone help with the full text I need to upload to the subdomain? Link to comment Share on other sites More sharing options...
tdr170 Posted April 29, 2013 Share Posted April 29, 2013 (edited) Sorry For the post above I only went to the bottom of the first page wrote the comment and then realized there was a second page. From looking at the page I thought you had this fixed. Check the products table in the database and see if your products are there. The ps_subdomain sql is below. -- -- Table structure for table `ps_subdomain` -- DROP TABLE IF EXISTS `ps_subdomain`; CREATE TABLE IF NOT EXISTS `ps_subdomain` ( `id_subdomain` int(10) unsigned NOT NULL auto_increment, `name` varchar(16) NOT NULL, psIMARY KEY (`id_subdomain`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Dumping data for table `ps_subdomain` -- INSERT INTO `ps_subdomain` VALUES (1, 'www'); Edited April 29, 2013 by tdr170 (see edit history) Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 Thank you...I'll try this now. I've tried pasting similar text in earlier though, and i kept getting an error...I'll keep you posted in about 1 minute.... Sorry to ask...do I copy these bits in as well? -- -- Table structure for table `ps_subdomain` -- -- -- Dumping data for table `ps_subdomain` -- INSERT INTO `ps_subdomain` VALUES (1, 'www'); Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 I just pasted the text in the centre, and I got: SQL query: CREATE TABLE IF NOT EXISTS `ps_subdomain` ( `id_subdomain` INT ( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT , `name` VARCHAR ( 16 ) NOT NULL , psIMARY KEY ( `id_subdomain` ) ) ENGINE = MYISAM AUTO_INCREMENT =2 DEFAULT CHARSET = utf8 AUTO_INCREMENT =2; MySQL said: #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 'KEY (`id_subdomain`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 AUTO' at line 4 Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 Sorry...I've just run the whole text, with no errors, and it's come back with empty results: -- -- Table structure for table `ps_subdomain` -- DROP TABLE IF EXISTS `ps_subdomain`;# MySQL returned an empty result set (i.e. zero rows). # MySQL returned an empty result set (i.e. zero rows). CREATE TABLE IF NOT EXISTS `ps_subdomain` ( `id_subdomain` int(10) unsigned NOT NULL auto_increment, `name` varchar(16) NOT NULL, PRIMARY KEY (`id_subdomain`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;# MySQL returned an empty result set (i.e. zero rows). # MySQL returned an empty result set (i.e. zero rows). -- -- Dumping data for table `ps_subdomain` -- INSERT INTO `ps_subdomain` VALUES (1, 'www');# 1 row affected. # 1 row affected. # MySQL returned an empty result set (i.e. zero rows). Link to comment Share on other sites More sharing options...
Herbalife Posted April 29, 2013 Author Share Posted April 29, 2013 The featured products show on the homepage, and they appear when you click through to 'other products in same category' etc, but I've realised that the category pages are totally blank..not even 'no products to display'. All categories are marked as 'displayed', in the correct parent category, and have a friendly url. Any help would really be appreciated thank you. Link to comment Share on other sites More sharing options...
tdr170 Posted April 30, 2013 Share Posted April 30, 2013 (edited) The above results are correct you should now have the table in your database. Don't read to much into the details as long as it said Your SQL query has been executed successfully. Have you tried to regenerate your .htaccess file. Edited April 30, 2013 by tdr170 (see edit history) Link to comment Share on other sites More sharing options...
Herbalife Posted April 30, 2013 Author Share Posted April 30, 2013 Thank you for that. I've just rewritten the httaccess file and no joy though I've also discovered that customers can't log into the site either...having a bit of a nightmare! Link to comment Share on other sites More sharing options...
tdr170 Posted April 30, 2013 Share Posted April 30, 2013 Try this use your FTP program and browse to your admin folder then /backups and see if you have any backups listed. May be named something like 162731526-65b765f92.sql.bz2 this is a backup of your database made at the time you upgraded. Download to your computer, unzip and copy the entire file and paste that in your SQL of the database. Before you do use the export feature from the database and select both drop table and create table then save as a zip to your computer. See if this helps. You may need to add the subdomain again not really sure but maybe the rollback did not correctly restore the database. You can view the file after you unzip with something like Notepad++ (free download) and look through it to see if it is different then the database on your server. Mainly go to ps_products and see how many entries there are and compare that to the download. Link to comment Share on other sites More sharing options...
Herbalife Posted April 30, 2013 Author Share Posted April 30, 2013 Hi tdr170. Thank you for your advice. The problem is, the system took a full back-up during the '1click upgrade' process, which I have unzipped on my hard drive, but there is no sql file with yesterday's date. I've got the site up, but the category pages have no content apart from the header, top menu, footer and blocks. I have no idea what to do next? Any help would be greatly appreciated, thank you. Link to comment Share on other sites More sharing options...
Recommended Posts