0

我无法从 BO 访问承运人、库存和仓库,它抛出了这种错误,我不明白这个错误是怎么回事。请指导我,因为我对 prestashop 很陌生。请参阅下面的图片链接以查看错误:

图像.png

[PrestaShopDatabaseException] 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 2 行的 ')' 附近使用正确的语法

选择 * 从ps_hook_module_exceptions 哪里id_shop()

在文件 classes/db/Db.php 的第 791 行

  1. if ($webservice_call && $errno) {
  2. $dbg = debug_backtrace();
  3. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[ 3]['class'] : '').'->'.$dbg[3]['function'].'() 查询为 : '.$sql, 97);
  4. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
  5. 如果($sql){
  6. 抛出新的 PrestaShopDatabaseException($this->getMsgError()。'

    '.$sql.'
    ');
  7. }
    1. 抛出新的 PrestaShopDatabaseException($this->getMsgError());
  8. }
  9. }

DbCore->displayError - [第 425 行 - classes/db/Db.php] - [1 参数]

  1. $this->result = $this->_query($sql);
  2. }
  3. }
    1. 如果(_PS_DEBUG_SQL_){
  4. $this->displayError($sql);
  5. }
    1. 返回$this->结果;
  6. }
  7. 430。

论据 [0]

选择 * 从ps_hook_module_exceptions 哪里id_shop()

DbCore->query - [第 643 行 - classes/db/Db.php] - [1 参数]

  1. throw new PrestaShopDatabaseException('Db->executeS() 只能用于选择、显示、解释或描述查询');
  2. }
  3. 返回 $this->execute($sql, $use_cache);
  4. }
    1. $this->result = $this->query($sql);
    1. if (!$this->result) {
  5. $结果=假;
  6. } 别的 {
  7. if (!$array) { 参数 [0]

选择 * 从ps_hook_module_exceptions 哪里id_shop()

DbCore->executeS - [第 2142 行 - 类/模块/Module.php] - [2 个参数]

  1. if (!Cache::isStored($cache_id)) {
  2. $exceptions_cache = 数组();
  3. $sql = '选择 * 从'._DB_PREFIX_.'hook_module_exceptions
  4. WHERE id_shopIN ('.implode(', ', Shop::getContextListShopID()).')';
  5. $db = Db::getInstance();
  6. $result = $db->e​​xecuteS($sql, false);
  7. 而 ($row = $db->nextRow($result)) {
  8. if (!$row['file_name']) {
  9. 继续;
  10. }
  11. $key = $row['id_hook'].'-'.$row['id_module'];

论据 [0]

SELECT * FROM ps_hook_module_exceptions WHERE id_shopIN () 参数1

ModuleCore::getExceptionsStatic - [line 495 - classes/Hook.php] - [2 Arguments] 490. 继续;491. } 492. 493. // 检查权限 494. if ($check_exceptions) { 495. $exceptions = Module::getExceptionsStatic($array['id_module'], $array['id_hook']); 496. 497. $controller = Dispatcher::getInstance()->getController(); 498. $controller_obj = 上下文::getContext()->控制器;499. 500. //检查当前控制器是否为模块控制器 Argument [0] 63 Argument 1 57

HookCore::exec - [第 2749 行 - 类/控制器/AdminController.php] - [2 个参数]

  1. 'host_mode' => 已定义('_PS_HOST_MODE_')?1 : 0,
  2. 'stock_management' => (int)Configuration::get('PS_STOCK_MANAGEMENT')
  3. ));
    1. if ($this->display_header) {
  4. $this->context->smarty->assign('displayBackOfficeHeader', Hook::exec('displayBackOfficeHeader', array()));
  5. }
    1. $this->context->smarty->assign(array(
  6. 'displayBackOfficeTop' => Hook::exec('displayBackOfficeTop', array()),
  7. 'submit_form_ajax' => (int)Tools::getValue('submitFormAjax') 参数 [0] displayBackOfficeHeader 参数1 数组 ()

AdminControllerCore->init - [第 170 行 - 类/控制器/Controller.php]

  1. /**
    • 启动控制器进程(此方法不应被覆盖!)
  2. */
  3. 公共函数运行()
  4. {
  5. $this->init();
  6. if ($this->checkAccess()) {
  7. // setMedia 必须在 postProcess 之前调用
  8. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
  9. $this->setMedia();
  10. }

ControllerCore->运行 - [第 367 行 - 类/Dispatcher.php]

  1. 如果(isset($params_hook_action_dispatcher)){
  2. 钩子::exec('actionDispatcher', $params_hook_action_dispatcher);
  3. }
    1. // 运行控制器
  4. $控制器->运行();
  5. } 捕捉(PrestaShopException $e){
  6. $e->displayMessage();
  7. }
  8. }
  9. 372.

DispatcherCore->dispatch - [第 58 行 - admin/index.php]

  1. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) {
  2. $_REQUEST['controller'] = strtolower($_REQUEST['tab']);
  3. }
    1. // 准备并触发管理调度程序
  4. Dispatcher::getInstance()->dispatch();
4

0 回答 0