xavier777 Posted May 31, 2014 Share Posted May 31, 2014 Bonjour à tous, J'ai fait une mise à jour depuis la version 1.5.6.0 vers la version 1.6.0.6 et le bloc catégories plante toute la boutique. Si je dé-greffe le bloc catégories, la boutique marche. J'ai ceci comme message d'erreur : on dirait que la requête SQL n'est pas complète ... AND nleft >= AND nright <= Auriez vous une idée de comment résoudre ce porblème svp ? [PrestaShopDatabaseException]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 'AND nright <= AND c.id_category IN ( SELECT id_category FROM `ps_cat' at line 8 SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite FROM `ps_category` c INNER JOIN `ps_category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = 1 AND cl.id_shop = 1 ) INNER JOIN `ps_category_shop` cs ON (cs.`id_category` = c.`id_category` AND cs.`id_shop` = 1) WHERE (c.`active` = 1 OR c.`id_category` = 0) AND c.`id_category` != 1 AND `level_depth` <= 4 AND nleft >= AND nright <= AND c.id_category IN ( SELECT id_category FROM `ps_category_group` WHERE `id_group` IN (3) ) ORDER BY `level_depth` ASC, cl.`name` DESC Merci d'avance, Xavier Link to comment Share on other sites More sharing options...
Mediacom87 Posted June 1, 2014 Share Posted June 1, 2014 Bonjour, Vous avez bien fait une désinstallation et réinstallation complète du module ? Link to comment Share on other sites More sharing options...
xavier777 Posted June 1, 2014 Author Share Posted June 1, 2014 Bonjour Mediacom87, Oui j'ai fait une réinstallation du module mais j'ai découvert que cela venait de plus haut : j'ai installé le module "Comptant à la livraison" et cela fait pareil :/ Link to comment Share on other sites More sharing options...
MusikMachineMan Posted June 13, 2014 Share Posted June 13, 2014 (edited) Bonjour, je relance le sujet, car j'ai le même problème, un éclaircissement serait le bienvenu merci d'avance Edited June 13, 2014 by MusikMachineMan (see edit history) Link to comment Share on other sites More sharing options...
fuegonju Posted June 14, 2014 Share Posted June 14, 2014 Hello, i have exactly the same problem. waiting for a solution. thanks Link to comment Share on other sites More sharing options...
xavier777 Posted June 14, 2014 Author Share Posted June 14, 2014 Hi fuegonju and MusikMachineMan, Do you updated the shop ? Link to comment Share on other sites More sharing options...
fuegonju Posted June 14, 2014 Share Posted June 14, 2014 Hi Xavier, well it's a new prestashop 1.6.0.6 installation Link to comment Share on other sites More sharing options...
xavier777 Posted June 14, 2014 Author Share Posted June 14, 2014 Ok ! So It's not a update problem ! May be another module create this bug : Did you add some modules ? Link to comment Share on other sites More sharing options...
fuegonju Posted June 14, 2014 Share Posted June 14, 2014 no, the only think i did is put new products with rest webservices. I see that the error comes by 'category'. I delete all products but i can't remove stock_availables items... at this moment i don't know to resolve this problem..any ideas? Link to comment Share on other sites More sharing options...
xavier777 Posted June 14, 2014 Author Share Posted June 14, 2014 No, i have no idea :/ It look like to a sql request badly dynamicaly formed ... Did you enable the debug mode and is it the same error than me ? Link to comment Share on other sites More sharing options...
fuegonju Posted June 14, 2014 Share Posted June 14, 2014 (edited) yes... i think i updated some days ago a module but i don't remember which was..hope that someone search the same sql query at google at arrives here and tell us how to solucionate this! Edited June 14, 2014 by fuegonju (see edit history) Link to comment Share on other sites More sharing options...
fuegonju Posted June 14, 2014 Share Posted June 14, 2014 Error comes from blockcategories module : [PrestaShopDatabaseException]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 'AND nright <= AND c.id_category IN ( SELECT id_category FROM `ps_cat' at line 8 SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite FROM `ps_category` c INNER JOIN `ps_category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = 1 AND cl.id_shop = 1 ) INNER JOIN `ps_category_shop` cs ON (cs.`id_category` = c.`id_category` AND cs.`id_shop` = 1) WHERE (c.`active` = 1 OR c.`id_category` = 0) AND c.`id_category` != 1 AND `level_depth` <= 4 AND nleft >= AND nright <= AND c.id_category IN ( SELECT id_category FROM `ps_category_group` WHERE `id_group` IN (1) ) ORDER BY `level_depth` ASC, cl.`name` ASCat line 635 in file classes/db/Db.php 629. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);630. }631. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))632. {633. if ($sql)634. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');635. throw new PrestaShopDatabaseException($this->getMsgError());636. }637. }638.639. /** DbCore->displayError - [line 325 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 501 - classes/db/Db.php] - [1 Arguments] DbCore->executeS - [line 226 - modules/blockcategories/blockcategories.php] - [1 Arguments]220. AND c.id_category IN (221. SELECT id_category222. FROM `'._DB_PREFIX_.'category_group`223. WHERE `id_group` IN ('.pSQL(implode(', ', Customer::getGroupsStatic((int)$this->context->customer->id))).')224. )225. ORDER BY `level_depth` ASC, '.(Configuration::get('BLOCK_CATEG_SORT') ? 'cl.`name`' : 'cs.`position`').' '.(Configuration::get('BLOCK_CATEG_SORT_WAY') ? 'DESC' : 'ASC'));226. foreach ($result as &$row)227. {228. $resultParents[$row['id_parent']][] = &$row;229. $resultIds[$row['id_category']] = &$row;230. } BlockCategories->hookLeftColumn - [line 509 - classes/Hook.php] - [1 Arguments] HookCore::exec - [line 445 - classes/controller/FrontController.php] - [1 Arguments] FrontControllerCore->initContent - [line 58 - controllers/front/SearchController.php] SearchControllerCore->initContent - [line 180 - classes/controller/Controller.php] ControllerCore->run - [line 373 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] Link to comment Share on other sites More sharing options...
Oron Posted June 14, 2014 Share Posted June 14, 2014 Bonjour Nous sommes sur le forum francophone merci d'utiliser la langue française. Link to comment Share on other sites More sharing options...
xavier777 Posted June 14, 2014 Author Share Posted June 14, 2014 ok, c'est noté Link to comment Share on other sites More sharing options...
MusikMachineMan Posted June 15, 2014 Share Posted June 15, 2014 En ce qui me concerne, même cas de figure : 1.6.0.6 en installation directe (pas de upgrade) syntax error identique à celle de fuegonju... merci d'avance aux experts Link to comment Share on other sites More sharing options...
xavier777 Posted June 15, 2014 Author Share Posted June 15, 2014 J'ai déjà installé la 1.6.0.6 sans rencontrer ce problème avec les produits par défaut. Et si c'était l’installation sans les produits de démonstration qui fait que le bloc catégorie dysfonctionne ? Avez vous installé la 1.6.0.6 sans les produits de démonstration ? Link to comment Share on other sites More sharing options...
xavier777 Posted June 17, 2014 Author Share Posted June 17, 2014 (edited) Bon j'y suis allé comme un sauvage : j'ai trouvé la ligne qui pose problème dans modules/blockcategories/blockcategories.php J'ai commenté la ligne 207 car elle produit un bout de la requête SQL incomplète AND nleft >= AND nright <= Si je fais un print_r de $category $category->nleft et $category->nright sont vides :/ if ($category) { if ($maxdepth > 0) $maxdepth += $category->level_depth; // $range = 'AND nleft >= '.$category->nleft.' AND nright <= '.$category->nright; } Bon, je ne sais pas si ça produit une effet de bord quelque part ... mais le bloc catégorie a l'air de fonctionner Edited June 17, 2014 by xavier777 (see edit history) Link to comment Share on other sites More sharing options...
Oron Posted June 17, 2014 Share Posted June 17, 2014 Bonjour Faites un rapport sur http://forge.prestashop.com merci Link to comment Share on other sites More sharing options...
MusikMachineMan Posted June 18, 2014 Share Posted June 18, 2014 merci xavier777, pour moi ça ne me met plus d'erreur en tout cas ! Link to comment Share on other sites More sharing options...
xavier777 Posted June 18, 2014 Author Share Posted June 18, 2014 Cool ! Je vais faire un rapport comme l'a suggéré Oron Link to comment Share on other sites More sharing options...
xavier777 Posted June 21, 2014 Author Share Posted June 21, 2014 Bonjour Faites un rapport sur http://forge.prestashop.com merci Voilà c'est fait : http://forge.prestashop.com/browse/PSCFV-12235 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