Decadent Vapours Posted August 13, 2013 Share Posted August 13, 2013 Hi Everyone We are on PrestaShop 1.5.....I was in the middle of adding new products and realized that I did not need the product so deleted it and its category. I then clicked onto products and nothing came up except Bad SQL queryUnknown column 'cp.position' in 'field list' Does anybody know what this is and how to get rid of it ? This is a big problem as none of my products are showing, I would be greatly thankful if anyone can help me out. Link to comment Share on other sites More sharing options...
vekia Posted August 13, 2013 Share Posted August 13, 2013 the cateogry that you removed, do you remember its ID number? Link to comment Share on other sites More sharing options...
Decadent Vapours Posted August 13, 2013 Author Share Posted August 13, 2013 the cateogry that you removed, do you remember its ID number? It would have been 429 because it was within another category. Everything else is fine its just the products page which nothing is coming up in. Link to comment Share on other sites More sharing options...
vekia Posted August 13, 2013 Share Posted August 13, 2013 so can you check the ps_category_product tab, maybe you've got there entries related to the 429 category id. If so, this is causing the issue probably. (i've got similar problem some time ago) you can run query: SELECT * FROM ps_category_product where id_category=429 Link to comment Share on other sites More sharing options...
Enrique Gómez Posted August 13, 2013 Share Posted August 13, 2013 (edited) You could try this select to see if hangs some category in ps_category_product table SELECT cp.id_category from ps_category_product cp WHERE cp.id_category NOT IN (SELECT c.id_category from ps_category c) Edited August 13, 2013 by Enrique Gómez (see edit history) Link to comment Share on other sites More sharing options...
Decadent Vapours Posted August 14, 2013 Author Share Posted August 14, 2013 I've checked the category tab and there is a category in there which is ID 429 ?? Link to comment Share on other sites More sharing options...
vekia Posted August 14, 2013 Share Posted August 14, 2013 and what about other tables, where the category id may be associated? like ps_category_product Link to comment Share on other sites More sharing options...
Decadent Vapours Posted August 14, 2013 Author Share Posted August 14, 2013 Hi Vekia The sub-category I deleted was under another 2 sub-categories which had 427 & 428 ID numbers so im guessing the one I deleted was 429 ? There is a separate category that has the ID 429....... I'm very sorry if I am causing you frustration as you are doing your best to help but I do not know what you mean when you say ps_category_product The entire product page is not showing but just shows Bad SQL queryUnknown column 'cp.position' in 'field list' Every other page and category sections in my back office works. Link to comment Share on other sites More sharing options...
Enrique Gómez Posted August 14, 2013 Share Posted August 14, 2013 I think the following query in phpmyadmin will give you the problematic ids. The ids returned by the query will indicate the rows that must be deleted in table ps_category_product. You could try this select to see if hangs some category in ps_category_product table SELECT cp.id_category from ps_category_product cp WHERE cp.id_category NOT IN (SELECT c.id_category from ps_category c) Link to comment Share on other sites More sharing options...
maydayseals Posted February 13, 2014 Share Posted February 13, 2014 Hi Something has happened to our website and it has completely crashed lost all products the error we have is Bad SQL queryTable './mayday/ps_product_lang' is marked as crashed and should be repaired Not sure what has happened and our 'IT' department are being less than helpful. can anyone shed any light on what has happened Thanks Link to comment Share on other sites More sharing options...
tomerg3 Posted February 13, 2014 Share Posted February 13, 2014 It's impossible to tell what happened without access to server + logs (and even then it is a shot in the dark). Did you try to repair the table from phpMyAdmin? Link to comment Share on other sites More sharing options...
JeffV Posted March 9, 2014 Share Posted March 9, 2014 I'm having a similar issue when I was trying to delete a single product. I'm also having issues with saving ANY new data in ANY of my products.....it just cycles forever, eventually times out and returns an error 404. Any ideas? Link to comment Share on other sites More sharing options...
maydayseals Posted March 10, 2014 Share Posted March 10, 2014 (edited) I'm having a similar issue when I was trying to delete a single product. I'm also having issues with saving ANY new data in ANY of my products.....it just cycles forever, eventually times out and returns an error 404. Any ideas? We were having the same issues after a long fight with our IT dept. We are going to try going to a high performance server as we have enough room on the server but it isn't quick enough for all the information that we have. Edited March 10, 2014 by maydayseals (see edit history) Link to comment Share on other sites More sharing options...
JeffV Posted March 11, 2014 Share Posted March 11, 2014 @ Maydayseals - Are you getting a bad SQL error message AND the 404 error while trying to update products or just the bad SQL message? I'm building out my site and I have only 10 demo products (5 that came with my theme, 5 I created on my own), I cannot save any additional information on any of them. I cannot even delete them. Do I understand that you are trying for a dedicated server? My site is nearly finished, but if I cannot add, modify, delete products this site will be useless and years worth of work are going to go down the drain. Link to comment Share on other sites More sharing options...
maydayseals Posted March 11, 2014 Share Posted March 11, 2014 I don't know an awful lot about it but we are with a company called Fast Hosts who held all our website on a standard server. we are just hoping that moving it to a high performance high speed server may help i think its costing an extra £12.00 or something but we have over 3,000 products though. So i am not sure with yours sorry. Link to comment Share on other sites More sharing options...
Recommended Posts