Jump to content

Add carrier button generates error page


Recommended Posts

So after learning that the connect to fedex module does not support international shipping, I have uninstalled it, and installed the Fedex module from presto chango. After configuring the fedex module, no new carriers were created. So no fedex carriers are available in shipping. When I click the "add carrier" button in carriers, it generates an error page as follows:

 

[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 `ps16_hook_module_exceptions`
                WHERE `id_shop` IN ()

at 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.     /**
Link to comment
Share on other sites

at 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]
    319.         if ($sql instanceof DbQuery)
    320.             $sql = $sql->build();
    321.
    322.         $this->result = $this->_query($sql);
    323.         if (_PS_DEBUG_SQL_)
    324.             $this->displayError($sql);
    325.         return $this->result;
    326.     }
    327.
    328.     /**
    329.      * Execute an INSERT query
  • DbCore->query - [line 501 - classes/db/Db.php] - [1 Arguments]
    495.         {
    496.             $this->last_cached = true;
    497.             return $result;
    498.         }
    499.
    500.         $this->result = $this->query($sql);
    501.
    502.         if (!$this->result)
    503.             $result = false;
    504.         else
    505.         {
  • DbCore->executeS - [line 1717 - classes/module/Module.php] - [2 Arguments]
    1711.         {
    1712.             $exceptionsCache = array();
    1713.             $sql = 'SELECT * FROM `'._DB_PREFIX_.'hook_module_exceptions`
    1714.                 WHERE `id_shop` IN ('.implode(', ', Shop::getContextListShopID()).')';
    1715.             $db = Db::getInstance();
    1716.             $result = $db->executeS($sql, false);
    1717.             while ($row = $db->nextRow($result))
    1718.             {
    1719.                 if (!$row['file_name'])
    1720.                     continue;
    1721.                 $key = $row['id_hook'].'-'.$row['id_module'];
  • ModuleCore->getExceptions - [line 469 - classes/Hook.php] - [1 Arguments]
    463.                 continue;
    464.
    465.             // Check permissions
    466.             if ($check_exceptions)
    467.             {
    468.                 $exceptions = $moduleInstance->getExceptions($array['id_hook']);
    469.
    470.                 $controller = Dispatcher::getInstance()->getController();
    471.                 $controller_obj = Context::getContext()->controller;
    472.                 
    473.                 //check if current controller is a module controller
  • HookCore::exec - [line 2278 - classes/controller/AdminController.php] - [2 Arguments]
    2272.             'host_mode' => defined('_PS_HOST_MODE_') ? 1 : 0,
    2273.             'stock_management' => (int)Configuration::get('PS_STOCK_MANAGEMENT')
    2274.         ));
    2275.
    2276.         if ($this->display_header)
    2277.             $this->context->smarty->assign('displayBackOfficeHeader', Hook::exec('displayBackOfficeHeader', array()));
    2278.         
    2279.         $this->context->smarty->assign(array(
    2280.             'displayBackOfficeTop' => Hook::exec('displayBackOfficeTop', array()),
    2281.             'submit_form_ajax' => (int)Tools::getValue('submitFormAjax')
    2282.         ));
  • AdminControllerCore->init - [line 163 - classes/controller/Controller.php]
    157.     /**
    158.      * Start controller process (this method shouldn't be overriden !)
    159.      */
    160.     public function run()
    161.     {
    162.         $this->init();
    163.         if ($this->checkAccess())
    164.         {
    165.             // setMedia MUST be called before postProcess
    166.             if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
    167.                 $this->setMedia();
  • ControllerCore->run - [line 373 - classes/Dispatcher.php]
    367.             // Execute hook dispatcher
    368.             if (isset($params_hook_action_dispatcher))
    369.                 Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
    370.
    371.             // Running controller
    372.             $controller->run();
    373.         }
    374.         catch (PrestaShopException $e)
    375.         {
    376.             $e->displayMessage();
    377.         }
  • DispatcherCore->dispatch - [line 54 - admin/index.php]
    48.     $_POST['controller'] = strtolower($_POST['tab']);
    49. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab']))
    50.     $_REQUEST['controller'] = strtolower($_REQUEST['tab']);
    51.
    52. // Prepare and trigger admin dispatcher
    53. Dispatcher::getInstance()->dispatch();
Link to comment
Share on other sites

×
×
  • Create New...