I cannot access carrier, stock and warehouse from BO, it threws this kind of error and I don't understand what this error is all about. Kindly please guide me because I'm quite new with prestashop. Please refer to the image link below to see the 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 ')' at line 2
SELECT * FROM ps_hook_module_exceptions
WHERE id_shop
IN ()
at line 791 in file classes/db/Db.php
- 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().'
'.$sql.'
'); - }
- throw new PrestaShopDatabaseException($this->getMsgError());
- }
- }
DbCore->displayError - [line 425 - classes/db/Db.php] - [1 Arguments]
- $this->result = $this->_query($sql);
- }
- }
- if (_PS_DEBUG_SQL_) {
- $this->displayError($sql);
- }
- return $this->result;
- } 430.
Argument [0]
SELECT * FROM ps_hook_module_exceptions
WHERE id_shop
IN ()
DbCore->query - [line 643 - classes/db/Db.php] - [1 Arguments]
- throw new PrestaShopDatabaseException('Db->executeS() must be used only with select, show, explain or describe queries');
- }
- return $this->execute($sql, $use_cache);
- }
- $this->result = $this->query($sql);
- if (!$this->result) {
- $result = false;
- } else {
- if (!$array) { Argument [0]
SELECT * FROM ps_hook_module_exceptions
WHERE id_shop
IN ()
DbCore->executeS - [line 2142 - classes/module/Module.php] - [2 Arguments]
- if (!Cache::isStored($cache_id)) {
- $exceptions_cache = array();
- $sql = 'SELECT * FROM
'._DB_PREFIX_.'hook_module_exceptions
- WHERE
id_shop
IN ('.implode(', ', Shop::getContextListShopID()).')'; - $db = Db::getInstance();
- $result = $db->executeS($sql, false);
- while ($row = $db->nextRow($result)) {
- if (!$row['file_name']) {
- continue;
- }
- $key = $row['id_hook'].'-'.$row['id_module'];
Argument [0]
SELECT * FROM ps_hook_module_exceptions
WHERE id_shop
IN ()
Argument 1
ModuleCore::getExceptionsStatic - [line 495 - classes/Hook.php] - [2 Arguments] 490. continue; 491. } 492. 493. // Check permissions 494. if ($check_exceptions) { 495. $exceptions = Module::getExceptionsStatic($array['id_module'], $array['id_hook']); 496. 497. $controller = Dispatcher::getInstance()->getController(); 498. $controller_obj = Context::getContext()->controller; 499. 500. //check if current controller is a module controller Argument [0] 63 Argument 1 57
HookCore::exec - [line 2749 - classes/controller/AdminController.php] - [2 Arguments]
- 'host_mode' => defined('_PS_HOST_MODE_') ? 1 : 0,
- 'stock_management' => (int)Configuration::get('PS_STOCK_MANAGEMENT')
- ));
- if ($this->display_header) {
- $this->context->smarty->assign('displayBackOfficeHeader', Hook::exec('displayBackOfficeHeader', array()));
- }
- $this->context->smarty->assign(array(
- 'displayBackOfficeTop' => Hook::exec('displayBackOfficeTop', array()),
- 'submit_form_ajax' => (int)Tools::getValue('submitFormAjax') Argument [0] displayBackOfficeHeader Argument 1 Array ( )
AdminControllerCore->init - [line 170 - classes/controller/Controller.php]
- /**
- Starts the controller process (this method should not be overridden!)
- */
- public function run()
- {
- $this->init();
- if ($this->checkAccess()) {
- // setMedia MUST be called before postProcess
- if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
- $this->setMedia();
- }
ControllerCore->run - [line 367 - classes/Dispatcher.php]
- if (isset($params_hook_action_dispatcher)) {
- Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
- }
- // Running controller
- $controller->run();
- } catch (PrestaShopException $e) {
- $e->displayMessage();
- }
- } 372.
DispatcherCore->dispatch - [line 58 - admin/index.php]
- if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) {
- $_REQUEST['controller'] = strtolower($_REQUEST['tab']);
- }
- // Prepare and trigger admin dispatcher
- Dispatcher::getInstance()->dispatch();