genny3021 Posted May 12, 2014 Share Posted May 12, 2014 I get this error and similar ones if i try to add a product to cart, create a new product, update anything from the back office. Although after this error, the product is created but a custom function i have to be executed after creating a new product doesnt get to execute! Debug mode is set to true. [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 'id #90)) GROUP BY c.`id_condition`' at line 4 SELECT c.`id_condition`FROM `ps_condition` cLEFT JOIN `ps_condition_badge` cb ON cb.`id_condition` = c.`id_condition`WHERE (c.`calculation_type` = 'hook') AND (c.`calculation_detail` = 'actionObjectCartAddAfter') AND (c.`validated` = 0) AND (cb.`id_badge` IN (Object id #90))GROUP BY c.`id_condition`at line 613 in file classes/db/Db.php 607. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);608. }609. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))610. {611. if ($sql)612. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');613. throw new PrestaShopDatabaseException($this->getMsgError());614. }615. }616.617. /**DbCore->displayError - [line 313 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 488 - classes/db/Db.php] - [1 Arguments] DbCore->executeS - [line 105 - modules/gamification/classes/Condition.php] - [1 Arguments] Condition::getIdsByHookCalculation - [line 133 - modules/gamification/gamification.php] - [1 Arguments] Gamification->__call - [line - ] - [2 Arguments] Gamification->hookactionObjectCartAddAfter - [line 473 - classes/Hook.php] - [1 Arguments] HookCore::exec - [line 508 - classes/ObjectModel.php] - [2 Arguments] ObjectModelCore->add - [line 180 - classes/Cart.php] - [1 Arguments] CartCore->add - [line 245 - controllers/front/CartController.php] - [0 Argument] CartControllerCore->processChangeProductInCart - [line 72 - controllers/front/CartController.php] - [0 Argument] CartControllerCore->postProcess - [line 158 - classes/controller/Controller.php] - [0 Argument] ControllerCore->run - [line 348 - classes/Dispatcher.php] - [0 Argument] DispatcherCore->dispatch - [line 28 - index.php] - [0 Argument] I have updated my mysql from 5.0.77 to 5.0.95. php5.1.6The annoying thing is this same code works on my test server with same specs but on moving to production i get these errors. Please i need help urgently. The site is live already Please i need help or suggestions... anyone? Link to comment Share on other sites More sharing options...
vansrv7 Posted May 14, 2014 Share Posted May 14, 2014 Just moved my shop from localhost to remote server and I have the same problem. Link to comment Share on other sites More sharing options...
vansrv7 Posted May 15, 2014 Share Posted May 15, 2014 Solved for me this way: since my local installation works correctly and I just uploaded via ftp the whole instalaltion, I ended up it was some server configuration issue. So I compared the local php.ini with the one on the server and made the following changes: short_open_tag=Off (it was ON) max_input_vars=10000 (this line was missed) memory_limit=128M (was 32M) post_max_size=16M (was 8M) upload_max_filesize=100M (was 2M) I don't know which of these modifications was causing the problem, by the way now I can put products to cart, create a customer account and other things that before generated the DB error message. Hope this helps. Link to comment Share on other sites More sharing options...
genny3021 Posted June 4, 2014 Author Share Posted June 4, 2014 Thanks vansrv7. Mine disappeared after i installed json on my server. wierd right? yeah. 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