Got error 28 from storage engine
SELECT h.id_hook, h.name as h_name, title, description, h.position, live_edit, hm.position as hm_position, m.id_module, m.name, active
FROM `ps_hook` h
INNER JOIN `ps_hook_module` hm ON (h.id_hook = hm.id_hook AND hm.id_shop = 1)
INNER JOIN `ps_module` as m ON (m.id_module = hm.id_module)
ORDER BY hm.position
at line 639 in file classes/db/Db.php
634. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
635. }
636. elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
637. {
638. if ($sql)
639. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
640. throw new PrestaShopDatabaseException($this->getMsgError());
641. }
642. }
643.
644. /**
328. if ($sql instanceof DbQuery)
329. $sql = $sql->build();
330.
331. $this->result = $this->_query($sql);
332. if (_PS_DEBUG_SQL_)
333. $this->displayError($sql);
334. return $this->result;
335. }
336.
337. /**
338. * Execute an INSERT query
Argument [0] SELECT h.id_hook, h.name as h_name, title, description, h.position, live_edit, hm.position as hm_position, m.id_module, m.name, active FROM `ps_hook` h INNER JOIN `ps_hook_module` hm ON (h.id_hook = hm.id_hook AND hm.id_shop = 1) INNER JOIN `ps_module` as m ON (m.id_module = hm.id_module) ORDER BY hm.position
504. {
505. $this->last_cached = true;
506. return $result;
507. }
508.
509. $this->result = $this->query($sql);
510.
511. if (!$this->result)
512. $result = false;
513. else
514. {
Argument [0] SELECT h.id_hook, h.name as h_name, title, description, h.position, live_edit, hm.position as hm_position, m.id_module, m.name, active FROM `ps_hook` h INNER JOIN `ps_hook_module` hm ON (h.id_hook = hm.id_hook AND hm.id_shop = 1) INNER JOIN `ps_module` as m ON (m.id_module = hm.id_module) ORDER BY hm.position
223. $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
224. SELECT h.id_hook, h.name as h_name, title, description, h.position, live_edit, hm.position as hm_position, m.id_module, m.name, active
225. FROM `'._DB_PREFIX_.'hook` h
226. INNER JOIN `'._DB_PREFIX_.'hook_module` hm ON (h.id_hook = hm.id_hook AND hm.id_shop = '.(int)Context::getContext()->shop->id.')
227. INNER JOIN `'._DB_PREFIX_.'module` as m ON (m.id_module = hm.id_module)
228. ORDER BY hm.position');
229. $list = array();
230. foreach ($results as $result)
231. {
232. if (!isset($list[$result['id_hook']]))
233. $list[$result['id_hook']] = array();
Argument [0] SELECT h.id_hook, h.name as h_name, title, description, h.position, live_edit, hm.position as hm_position, m.id_module, m.name, active FROM `ps_hook` h INNER JOIN `ps_hook_module` hm ON (h.id_hook = hm.id_hook AND hm.id_shop = 1) INNER JOIN `ps_module` as m ON (m.id_module = hm.id_module) ORDER BY hm.position
261. * @param int $id_module
262. * @return array Modules List
263. */
264. public static function getModulesFromHook($id_hook, $id_module = null)
265. {
266. $hm_list = Hook::getHookModuleList();
267. $module_list = (isset($hm_list[$id_hook])) ? $hm_list[$id_hook] : array();
268.
269. if ($id_module)
270. return (isset($module_list[$id_module])) ? array($module_list[$id_module]) : array();
271. return $module_list;
509. public function registerNewHook($hook_name)
510. {
511. $return=true;
512. $id_hook=Hook::getIdByName($hook_name);
513.
514. $arrMod=Hook::getModulesFromHook($id_hook);
515. if(!$arrMod || count($arrMod)<=0)
516. {
517. $return&=$this->registerHook($hook_name);
518. }
519. return $return;
Argument [0] 156
498. public function hookHeader($params)
499. {
500. $newHook = array('displayBottomFooter','displayMainBottom','displayHomeTop');
501. foreach ($newHook AS $hook)
502. {
503. $this->registerNewHook($hook);
504. }
505.
506. $this->context->controller->addCSS($this->_path.'css/csstaticblocks.css');
507.
508. }
Argument [0] displayBottomFooter
507.
508. // Call hook method
509. if ($hook_callable)
510. $display = $moduleInstance->{'hook'.$hook_name}($hook_args);
511. elseif ($hook_retro_callable)
512. $display = $moduleInstance->{'hook'.$retro_hook_name}($hook_args);
513. // Live edit
514. if (!$array_return && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad') && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee')))
515. {
516. $live_edit = true;
517. $output .= self::wrapLiveEdit($display, $moduleInstance, $array['id_hook']);
Argument [0]
450. if (!$this->useMobileTheme())
451. {
452. // These hooks aren't used for the mobile theme.
453. // Needed hooks are called in the tpl files.
454. $this->context->smarty->assign(array(
455. 'HOOK_HEADER' => Hook::exec('displayHeader'),
456. 'HOOK_TOP' => Hook::exec('displayTop'),
457. 'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''),
458. 'HOOK_RIGHT_COLUMN' => ($this->display_column_right ? Hook::exec('displayRightColumn', array('cart' => $this->context->cart)) : ''),
459. ));
460. }
Argument [0] displayHeader
324. */
325. public function initContent()
326. {
327. $this->setTemplate(_PS_THEME_DIR_.'errors.tpl');
328. if (!$this->ajax)
329. parent::initContent();
330. }
331.
332. /**
333. * Display ajax content (this function is called instead of classic display, in ajax mode)
334. */
175.
176. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
177. $this->initHeader();
178.
179. if ($this->viewAccess())
180. $this->initContent();
181. else
182. $this->errors[] = Tools::displayError('Access denied.');
183.
184. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className)))
185. $this->initFooter();
369. // Execute hook dispatcher
370. if (isset($params_hook_action_dispatcher))
371. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
372.
373. // Running controller
374. $controller->run();
375. }
376. catch (PrestaShopException $e)
377. {
378. $e->displayMessage();
379. }
58. exit;
59. }
60. }
61.
62. require(dirname(__FILE__).'/config/config.inc.php');
63. Dispatcher::getInstance()->dispatch();
64.
65.