jonathan86 Posted October 16, 2014 Share Posted October 16, 2014 Hello,My front-endk gifs a 404 page when i click on some head categories on de top horisontal menu,i use presta shop 1.6and when i click on the ok button for the search poduct on the 404 page i get following error:[PrestaShopDatabaseException]You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND nright <= AND c.id_category IN ( SELECT id_category FROM `ps_cat' at line 8Does somebody has an idee?This is a part of the ps_category table:id_category id_parent id_shop_default level_depth nleft nright active date_add date_upd position is_root_category dot.gif Edit dot.gif Copy dot.gif Delete 1 0 1 0 1 120 1 2014-08-09 15:56:58 2014-08-09 15:56:58 0 0 dot.gif Edit dot.gif Copy dot.gif Delete 71 70 1 1 3 4 1 2014-09-20 18:32:23 2014-09-21 22:43:58 1 0 dot.gif Edit dot.gif Copy dot.gif Delete 73 67 1 1 3 4 1 2014-09-20 18:32:24 2014-10-03 20:38:33 3 0 dot.gif Edit dot.gif Copy dot.gif Delete 89 1 1 1 2 31 1 2014-10-06 21:41:43 2014-10-06 22:11:41 1 0 dot.gif Edit dot.gif Copy dot.gif Delete 90 89 1 2 3 4 1 2014-10-06 21:42:28 2014-10-06 21:42:28 0 0 dot.gif Edit dot.gif Copy dot.gif Delete 91 89 1 2 5 6 1 2014-10-06 21:43:03 2014-10-06 21:43:03 0 0 dot.gif Edit dot.gif Copy dot.gif Delete 92 89 1 2 7 8 1 2014-10-06 21:44:03 2014-10-06 21:44:03 0 0 dot.gif Edit dot.gif Copy dot.gif Delete 93 89 1 2 9 10 1 2014-10-06 21:44:41 2014-10-06 21:44:41 0 0 dot.gif Edit dot.gif Copy dot.gif Delete 94 89 1 2 11 12 1 2014-10-06 21:45:32 2014-10-06 21:45:32 0 0 dot.gif Edit dot.gif Copy dot.gif Delete 95 89 1 2 13 14 1 2014-10-06 21:46:14 2014-10-06 21:46:14 0 0 dot.gif Edit dot.gif Copy dot.gif Delete 96 89 1 2 15 16 1 2014-10-06 21:46:53 2014-10-06 21:46:53 0 0KR,jonathan Link to comment Share on other sites More sharing options...
NemoPS Posted October 17, 2014 Share Posted October 17, 2014 Can you share the site's url? It seems it's not properly getting the category tree. A print screen of the table would be more helpful anyway Link to comment Share on other sites More sharing options...
jonathan86 Posted October 17, 2014 Author Share Posted October 17, 2014 auto-zoeker.be Link to comment Share on other sites More sharing options...
NemoPS Posted October 18, 2014 Share Posted October 18, 2014 The weird thing is, all top level links lead to the homepage. I think the category tree is all messed up, how did you add categories? can you print screen the database table? Link to comment Share on other sites More sharing options...
jonathan86 Posted October 18, 2014 Author Share Posted October 18, 2014 I had this problem when i created the categories by imported the products in a CSV file. then i deleted al categories and created them manually in the backend but did didn't solved my problem. this is a screenshot from the db, if you like i can give you the hole db file. Link to comment Share on other sites More sharing options...
maconl Posted October 18, 2014 Share Posted October 18, 2014 (edited) Can you also please ad a screenshot when you click in your db on ps_category so Nemo1 can see the tables (tree) Edited October 18, 2014 by maconl (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted October 20, 2014 Share Posted October 20, 2014 Weird, both nleft and nright are assigned, though there is a duplicate at the beginning. What was the id of the one that spawned the error? Link to comment Share on other sites More sharing options...
jonathan86 Posted October 22, 2014 Author Share Posted October 22, 2014 Beetles is ID-categorie 113 @Maconl: is it this that you mean? Link to comment Share on other sites More sharing options...
jonathan86 Posted November 1, 2014 Author Share Posted November 1, 2014 Is this the information you asked for? Is there someone who can give me an answer. Thx, Jonathan Link to comment Share on other sites More sharing options...
jonathan86 Posted November 2, 2014 Author Share Posted November 2, 2014 I have some additional information: in the back end screens under categories, the root is missing see screenshot: Link to comment Share on other sites More sharing options...
jonathan86 Posted November 2, 2014 Author Share Posted November 2, 2014 I've found the sollution: The record in the table ps_shop wasn't refering to root category (root or home) Edit this and the problem will be solved. Link to comment Share on other sites More sharing options...
maconl Posted November 3, 2014 Share Posted November 3, 2014 Have Marked this topic as Solved Link to comment Share on other sites More sharing options...
Recommended Posts