Alien(PL) Posted May 26, 2020 Share Posted May 26, 2020 I have wierd issue with frontpage of the store while debugmode is ON ERROR: [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 'ORDER BY id_order DESC LIMIT 1' at line 1 SELECT * FROM ps_olympiaorders WHERE id_customer = ORDER BY id_order DESC LIMIT 1 at line 769 in file classes/db/Db.php 764. if ($webservice_call && $errno) { 765. $dbg = debug_backtrace(); 766. WebserviceRequest::getInstance()->setError(500, '[SQL Error] ' . $this->getMsgError() . '. From ' . (isset($dbg[3]['class']) ? $dbg[3]['class'] : '') . '->' . $dbg[3]['function'] . '() Query was : ' . $sql, 97); 767. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) { 768. if ($sql) { 769. throw new PrestaShopDatabaseException($this->getMsgError() . '<br /><br /><pre>' . $sql . '</pre>'); 770. } 771. 772. throw new PrestaShopDatabaseException($this->getMsgError()); 773. } 774. } DbCore->displayError - [line 385 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 663 - classes/db/Db.php] - [1 Arguments] DbCore->getRow - [line 305 - modules/dtlproduct/dtlproduct.php] - [1 Arguments] Dtlproduct->hookDisplayHeader - [line 966 - classes/Hook.php] - [1 Arguments] HookCore::coreCallHook - [line 351 - classes/Hook.php] - [3 Arguments] HookCore::callHookOn - [line 903 - classes/Hook.php] - [3 Arguments] HookCore::exec - [line 555 - classes/controller/FrontController.php] - [1 Arguments] FrontControllerCore->initContent - [line 38 - controllers/front/ContactController.php] ContactControllerCore->initContent - [line 281 - classes/controller/Controller.php] ControllerCore->run - [line 509 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] When i turn off debugmode then front is working however backend is blank page. When i comment those two lines in Db.php everything seems to load but as long as i stay in debugmode ON $errno = $this->getNumberError(); if ($webservice_call && $errno) { $dbg = debug_backtrace(); WebserviceRequest::getInstance()->setError(500, '[SQL Error] ' . $this->getMsgError() . '. From ' . (isset($dbg[3]['class']) ? $dbg[3]['class'] : '') . '->' . $dbg[3]['function'] . '() Query was : ' . $sql, 97); } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) { if ($sql) { //throw new PrestaShopDatabaseException($this->getMsgError() . '<br /><br /><pre>' . $sql . '</pre>'); } //throw new PrestaShopDatabaseException($this->getMsgError()); } } Link to comment Share on other sites More sharing options...
JBW Posted May 27, 2020 Share Posted May 27, 2020 This is caused by module "dtlproduct" - temporarily deactivate the module and contact the developer to fix the issue Link to comment Share on other sites More sharing options...
Alien(PL) Posted May 27, 2020 Author Share Posted May 27, 2020 (edited) @JBW thank you it solved problem with front Edited May 27, 2020 by Alien(PL) (see edit history) 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