lucas79 Posted June 5, 2015 Share Posted June 5, 2015 Ciao ho un problema, quando un utente clicca su una categoria qualsiasi mi esce questo errore : come posso risolverlo?? grazie [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 'USING BTREE, ADD KEY `condition` (`condition`,`id_product`) USING B' at line 2 ALTER TABLE ps_cat_restriction ADD PRIMARY KEY (id_product), ADD KEY `id_manufacturer` (`id_manufacturer`,`id_product`) USING BTREE, ADD KEY `condition` (`condition`,`id_product`) USING BTREE, ADD KEY `weight` (`weight`,`id_product`) USING BTREE at line 623 in file classes/db/Db.php 617. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);618. }619. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))620. {621. if ($sql)622. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');623. throw new PrestaShopDatabaseException($this->getMsgError());624. }625. }626. 627. /** DbCore->displayError - [line 313 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 453 - classes/db/Db.php] - [1 Arguments] DbCore->execute - [line 2133 - modules/blocklayered/blocklayered.php] - [2 Arguments] BlockLayered->getFilterBlock - [line 687 - modules/blocklayered/blocklayered.php] - [1 Arguments] BlockLayered->hookHeader - [line 500 - classes/Hook.php] - [1 Arguments] HookCore::exec - [line 486 - classes/controller/FrontController.php] - [1 Arguments] FrontControllerCore->initContent - [line 7 - override/classes/controller/FrontController.php] FrontController->initContent - [line 104 - controllers/front/CategoryController.php] CategoryControllerCore->initContent - [line 7 - override/controllers/front/CategoryController.php] CategoryController->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...
tuk66 Posted June 9, 2015 Share Posted June 9, 2015 It is a bug in that SQL query. It looks like that query should work well in MySQL 5.0, but shouldn't in later versions. Try (in /modules/blocklayered/blocklayered.php) ... ADD KEY `id_manufacturer` USING BTREE (`id_manufacturer`,`id_product`), ... Link to comment Share on other sites More sharing options...
lucas79 Posted June 9, 2015 Author Share Posted June 9, 2015 Grazie mille !!! è un bug del modurlo blocklayered ho ricaricato il modulo (ina versione vecchia che avevo salvato sul pc) e il problema si è risolto Luca 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