Unknown column 'sun_java' in 'field list'<br /><br /><pre>INSERT INTO `cb_guest` (`id_operating_system`, `id_web_browser`, `id_customer`, `javascript`, `screen_resolution_x`, `screen_resolution_y`, `screen_color`, `sun_java`, `adobe_flash`, `adobe_director`, `apple_quicktime`, `real_player`, `windows_media`, `accept_language`, `mobile_theme`) VALUES ('0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '', '0')</pre>
at line 769 in file classes/db/Db.php
764. if ($webservice_call && $errno) {
765. $dbg = debug_backtrace();
766. WebserviceRequest::getInstance()->setError(500, '[SQL Error] ' . $this->getMsgError() . '. From ' . (isset($dbg[3]['class']) ? $dbg[3]['class'] : '') . '->' . $dbg[3]['function'] . '() Query was : ' . $sql, 97);
767. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
768. if ($sql) {
769. throw new PrestaShopDatabaseException($this->getMsgError() . '<br /><br /><pre>' . $sql . '</pre>');
770. }
771.
772. throw new PrestaShopDatabaseException($this->getMsgError());
773. }
774. }
380. $this->result = $this->_query($sql);
381. }
382. }
383.
384. if (_PS_DEBUG_SQL_) {
385. $this->displayError($sql);
386. }
387.
388. return $this->result;
389. }
390.
735. if ($sql instanceof DbQuery) {
736. $sql = $sql->build();
737. }
738.
739. $this->result = false;
740. $result = $this->query($sql);
741. if ($use_cache && $this->is_cache_enabled) {
742. Cache::getInstance()->deleteQuery($sql);
743. }
744.
745. if (_PS_DEBUG_SQL_) {
471. $sql = $insert_keyword . ' INTO `' . $table . '` (' . $keys_stringified . ') VALUES ' . implode(', ', $values_stringified);
472. if ($type == Db::ON_DUPLICATE_KEY) {
473. $sql .= ' ON DUPLICATE KEY UPDATE ' . substr($duplicate_key_stringified, 0, -1);
474. }
475.
476. return (bool) $this->q($sql, $use_cache);
477. }
478.
479. /**
480. * Executes an UPDATE query.
481. *
554.
555. // Database insertion
556. if (Shop::checkIdShopDefault($this->def['table'])) {
557. $this->id_shop_default = (in_array(Configuration::get('PS_SHOP_DEFAULT'), $id_shop_list) == true) ? Configuration::get('PS_SHOP_DEFAULT') : min($id_shop_list);
558. }
559. if (!$result = Db::getInstance()->insert($this->def['table'], $this->getFields(), $null_values)) {
560. return false;
561. }
562.
563. // Get object id in database
564. $this->id = Db::getInstance()->Insert_ID();
511. *
512. * @throws PrestaShopException
513. */
514. public function save($null_values = false, $auto_date = true)
515. {
516. return (int) $this->id > 0 ? $this->update($null_values) : $this->add($auto_date, $null_values);
517. }
518.
519. /**
520. * Adds current object to the database.
521. *
234. */
235. public static function setNewGuest($cookie)
236. {
237. $guest = new Guest(isset($cookie->id_customer) ? Guest::getFromCustomer((int) ($cookie->id_customer)) : null);
238. $guest->userAgent();
239. $guest->save();
240. $cookie->id_guest = (int) ($guest->id);
241. }
242. }
77. }
78.
79. private function getScriptPlugins($params)
80. {
81. if (!isset($params['cookie']->id_guest)) {
82. Guest::setNewGuest($params['cookie']);
83.
84. if (Configuration::get('PS_STATSDATA_PLUGINS')) {
85. $this->context->controller->registerJavascript('modules-plugindetect', 'modules/' . $this->name . '/js/plugindetect.js', ['position' => 'bottom', 'priority' => 150]);
86.
87. $token = sha1($params['cookie']->id_guest . _COOKIE_KEY_);
68. return $html;
69. }
70.
71. public function hookDisplayBeforeBodyClosingTag($params)
72. {
73. $script_content_plugins = $this->getScriptPlugins($params);
74. $script_content_pages_views = $this->getScriptCustomerPagesViews($params);
75.
76. return $script_content_plugins . $script_content_pages_views;
77. }
78.
983. return $output;
984. }
985.
986. public static function coreCallHook($module, $method, $params)
987. {
988. return $module->{$method}($params);
989. }
990.
991. public static function coreRenderWidget($module, $hook_name, $params)
992. {
993. return $module->renderWidget($hook_name, $params);
407. // Since is_callable() will always return true when __call() is available,
408. // if the module was expecting an aliased hook name to be invoked, but we send
409. // the canonical hook name instead, the hook will never be acknowledged by the module.
410. $methodName = self::getMethodName($hookName);
411. if (is_callable([$module, $methodName])) {
412. return static::coreCallHook($module, $methodName, $hookArgs);
413. }
414.
415. // fall back to all other names
416. foreach (static::getAllKnownNames($hookName) as $hook) {
417. $methodName = self::getMethodName($hook);
920.
921. if (0 !== $key && true === $chain) {
922. $hook_args = $output;
923. }
924.
925. $display = Hook::callHookOn($moduleInstance, $registeredHookName, $hook_args);
926.
927. if ($array_return) {
928. $output[$moduleInstance->name] = $display;
929. } else {
930. if (true === $chain) {
162.
163. return $result;
164. }
165. unset($hook_params['h']);
166.
167. return Hook::exec($params['h'], $hook_params, $id_module);
168. }
169.
170. function smartyCleanHtml($data)
171. {
172. // Prevent xss injection.
78. } else {
79. $args[] = &$arguments[$a];
80. }
81. }
82.
83. return call_user_func_array($item, $args);
84. }
85. }
86.
87. public static function getInstance($smarty)
88. {
447. array (
448. 0 => 'Block_5076895056a6c5bca3b94c5_20692299',
449. ),
450. );
451. public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
452. echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['hook'][0], array( array('h'=>'displayBeforeBodyClosingTag'),$_smarty_tpl ) );
453. }
454. }
455. /* {/block 'hook_before_body_closing_tag'} */
456. }
243. */
244. public function callBlock(Smarty_Internal_Block $block, Smarty_Internal_Template $tpl)
245. {
246. $this->sourceStack[] = $tpl->source;
247. $tpl->source = $this->sources[ $block->tplIndex ];
248. $block->callBlock($tpl);
249. $tpl->source = array_pop($this->sourceStack);
250. }
251. }
179. $block->parent = $parent;
180. if ($block->append && !$block->prepend && isset($parent)) {
181. $this->callParent($tpl, $block, '\'{block append}\'');
182. }
183. if ($block->callsChild || !isset($block->child) || ($block->child->hide && !isset($block->child->child))) {
184. $this->callBlock($block, $tpl);
185. } else {
186. $this->process($tpl, $block->child, $block);
187. }
188. if ($block->prepend && isset($parent)) {
189. $this->callParent($tpl, $block, '{block prepend}');
151. }
152. // make sure we got child block of child template of current block
153. while ($block->child && $block->child->child && $block->tplIndex <= $block->child->tplIndex) {
154. $block->child = $block->child->child;
155. }
156. $this->process($tpl, $block);
157. }
158.
159. /**
160. * Goto child block or render this
161. *
163. <?php }?>
164.
165. <div id="outdated"></div>
166.
167. <?php
168. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_5076895056a6c5bca3b94c5_20692299', 'hook_before_body_closing_tag');
169. ?>
170.
171. </body>
172.
173. </html>
118. if ($_template->startRenderCallbacks) {
119. foreach ($_template->startRenderCallbacks as $callback) {
120. call_user_func($callback, $_template);
121. }
122. }
123. $unifunc($_template);
124. foreach ($_template->endRenderCallbacks as $callback) {
125. call_user_func($callback, $_template);
126. }
127. $_template->isRenderingCache = false;
128. } catch (Exception $e) {
109. array_merge($_template->cached->file_dependency, $this->file_dependency);
110. }
111. if ($_template->source->handler->uncompiled) {
112. $_template->source->handler->renderUncompiled($_template->source, $_template);
113. } else {
114. $this->getRenderedTemplateCode($_template);
115. }
116. if ($_template->caching && $this->has_nocache_code) {
117. $_template->cached->hashes[ $this->nocache_hash ] = true;
118. }
119. if ($_template->smarty->debugging) {
211. $this->cached->render($this, $no_output_filter);
212. } else {
213. if (!isset($this->compiled) || $this->compiled->compile_id !== $this->compile_id) {
214. $this->loadCompiled(true);
215. }
216. $this->compiled->render($this);
217. }
218. // display or fetch
219. if ($display) {
220. if ($this->caching && $this->smarty->cache_modified_check) {
221. $this->smarty->ext->_cacheModify->cacheModifiedCheck(
380. }
381. } else {
382. if (isset($tpl->compiled)) {
383. $tpl->compiled->render($tpl);
384. } else {
385. $tpl->render();
386. }
387. }
388. }
389.
390. /**
111. }
112. if (isset($template) && (($tpl->parent->_isTplObj() && $tpl->parent->source->type !== 'extends')
113. || $tpl->smarty->extends_recursion)
114. ) {
115. $tpl->_subTemplateRender(
116. $template,
117. $tpl->cache_id,
118. $tpl->compile_id,
119. $tpl->caching ? 9999 : 0,
120. $tpl->cache_lifetime,
121. array(),
38.
39. <?php
40. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_18934014306a6c5bca3a8064_62767019', 'center_column');
41. ?>
42.
43. <?php $_smarty_tpl->inheritance->endChild($_smarty_tpl, 'layouts/layout-both-columns.tpl');
44. }
45. /* {block 'left_column'} */
46. class Block_2813616706a6c5bca3a77c9_40062063 extends Smarty_Internal_Block
47. {
48. public $subBlocks = array (
118. if ($_template->startRenderCallbacks) {
119. foreach ($_template->startRenderCallbacks as $callback) {
120. call_user_func($callback, $_template);
121. }
122. }
123. $unifunc($_template);
124. foreach ($_template->endRenderCallbacks as $callback) {
125. call_user_func($callback, $_template);
126. }
127. $_template->isRenderingCache = false;
128. } catch (Exception $e) {
109. array_merge($_template->cached->file_dependency, $this->file_dependency);
110. }
111. if ($_template->source->handler->uncompiled) {
112. $_template->source->handler->renderUncompiled($_template->source, $_template);
113. } else {
114. $this->getRenderedTemplateCode($_template);
115. }
116. if ($_template->caching && $this->has_nocache_code) {
117. $_template->cached->hashes[ $this->nocache_hash ] = true;
118. }
119. if ($_template->smarty->debugging) {
211. $this->cached->render($this, $no_output_filter);
212. } else {
213. if (!isset($this->compiled) || $this->compiled->compile_id !== $this->compile_id) {
214. $this->loadCompiled(true);
215. }
216. $this->compiled->render($this);
217. }
218. // display or fetch
219. if ($display) {
220. if ($this->caching && $this->smarty->cache_modified_check) {
221. $this->smarty->ext->_cacheModify->cacheModifiedCheck(
380. }
381. } else {
382. if (isset($tpl->compiled)) {
383. $tpl->compiled->render($tpl);
384. } else {
385. $tpl->render();
386. }
387. }
388. }
389.
390. /**
111. }
112. if (isset($template) && (($tpl->parent->_isTplObj() && $tpl->parent->source->type !== 'extends')
113. || $tpl->smarty->extends_recursion)
114. ) {
115. $tpl->_subTemplateRender(
116. $template,
117. $tpl->cache_id,
118. $tpl->compile_id,
119. $tpl->caching ? 9999 : 0,
120. $tpl->cache_lifetime,
121. array(),
56.
57. <?php
58. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_5807572006a6c5bca380800_10245196', 'content');
59. ?>
60.
61. <?php $_smarty_tpl->inheritance->endChild($_smarty_tpl, $_smarty_tpl->tpl_vars['layout']->value);
62. }
63. /* {block 'head_seo'} */
64. class Block_10986902726a6c5bca37b915_09013055 extends Smarty_Internal_Block
65. {
66. public $subBlocks = array (
118. if ($_template->startRenderCallbacks) {
119. foreach ($_template->startRenderCallbacks as $callback) {
120. call_user_func($callback, $_template);
121. }
122. }
123. $unifunc($_template);
124. foreach ($_template->endRenderCallbacks as $callback) {
125. call_user_func($callback, $_template);
126. }
127. $_template->isRenderingCache = false;
128. } catch (Exception $e) {
109. array_merge($_template->cached->file_dependency, $this->file_dependency);
110. }
111. if ($_template->source->handler->uncompiled) {
112. $_template->source->handler->renderUncompiled($_template->source, $_template);
113. } else {
114. $this->getRenderedTemplateCode($_template);
115. }
116. if ($_template->caching && $this->has_nocache_code) {
117. $_template->cached->hashes[ $this->nocache_hash ] = true;
118. }
119. if ($_template->smarty->debugging) {
211. $this->cached->render($this, $no_output_filter);
212. } else {
213. if (!isset($this->compiled) || $this->compiled->compile_id !== $this->compile_id) {
214. $this->loadCompiled(true);
215. }
216. $this->compiled->render($this);
217. }
218. // display or fetch
219. if ($display) {
220. if ($this->caching && $this->smarty->cache_modified_check) {
221. $this->smarty->ext->_cacheModify->cacheModifiedCheck(
380. }
381. } else {
382. if (isset($tpl->compiled)) {
383. $tpl->compiled->render($tpl);
384. } else {
385. $tpl->render();
386. }
387. }
388. }
389.
390. /**
111. }
112. if (isset($template) && (($tpl->parent->_isTplObj() && $tpl->parent->source->type !== 'extends')
113. || $tpl->smarty->extends_recursion)
114. ) {
115. $tpl->_subTemplateRender(
116. $template,
117. $tpl->cache_id,
118. $tpl->compile_id,
119. $tpl->caching ? 9999 : 0,
120. $tpl->cache_lifetime,
121. array(),
43. <?php
44. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_8974791036a6c5bca36f9f1_31135009', 'content');
45. ?>
46.
47. <?php }
48. $_smarty_tpl->inheritance->endChild($_smarty_tpl, $_smarty_tpl->tpl_vars['ce_layout']->value);
49. }
50. /* {block 'head'} */
51. class Block_15422644566a6c5bca369f58_20921076 extends Smarty_Internal_Block
52. {
53. public $subBlocks = array (
118. if ($_template->startRenderCallbacks) {
119. foreach ($_template->startRenderCallbacks as $callback) {
120. call_user_func($callback, $_template);
121. }
122. }
123. $unifunc($_template);
124. foreach ($_template->endRenderCallbacks as $callback) {
125. call_user_func($callback, $_template);
126. }
127. $_template->isRenderingCache = false;
128. } catch (Exception $e) {
109. array_merge($_template->cached->file_dependency, $this->file_dependency);
110. }
111. if ($_template->source->handler->uncompiled) {
112. $_template->source->handler->renderUncompiled($_template->source, $_template);
113. } else {
114. $this->getRenderedTemplateCode($_template);
115. }
116. if ($_template->caching && $this->has_nocache_code) {
117. $_template->cached->hashes[ $this->nocache_hash ] = true;
118. }
119. if ($_template->smarty->debugging) {
211. $this->cached->render($this, $no_output_filter);
212. } else {
213. if (!isset($this->compiled) || $this->compiled->compile_id !== $this->compile_id) {
214. $this->loadCompiled(true);
215. }
216. $this->compiled->render($this);
217. }
218. // display or fetch
219. if ($display) {
220. if ($this->caching && $this->smarty->cache_modified_check) {
221. $this->smarty->ext->_cacheModify->cacheModifiedCheck(
227. ob_start();
228. $template->_mergeVars();
229. if (!empty(Smarty::$global_tpl_vars)) {
230. $template->tpl_vars = array_merge(Smarty::$global_tpl_vars, $template->tpl_vars);
231. }
232. $result = $template->render(false, $function);
233. $template->_cleanUp();
234. if ($saveVars) {
235. $template->tpl_vars = $savedTplVars;
236. $template->config_vars = $savedConfigVars;
237. } else {
111. * @throws SmartyException
112. * @return string rendered template output
113. */
114. public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null)
115. {
116. $result = $this->_execute($template, $cache_id, $compile_id, $parent, 0);
117. return $result === null ? ob_get_clean() : $result;
118. }
119.
120. /**
121. * displays a Smarty template
35. * {@inheritdoc}
36. */
37. public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null, $display = false, $merge_tpl_vars = true, $no_output_filter = false)
38. {
39. return "\n<!-- begin $template -->\n"
40. . parent::fetch($template, $cache_id, $compile_id, $parent, $display, $merge_tpl_vars, $no_output_filter)
41. . "\n<!-- end $template -->\n";
42. }
43. }
38. if (is_array($content)) {
39. foreach ($content as $tpl) {
40. $html .= $this->context->smarty->fetch($tpl, null, $this->getLayout());
41. }
42. } else {
43. $html = $this->context->smarty->fetch($content, null, $this->getLayout());
44. }
45. $regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>";
46. preg_match_all("/$regexp/siU", $html, $matches);
47.
48. $hrefsNofollow = array();
681. 'javascript' => $this->getJavascript(),
682. 'js_custom_vars' => Media::getJsDef(),
683. 'notifications' => $this->prepareNotifications(),
684. ]);
685.
686. $this->smartyOutputContent($this->template);
687.
688. return true;
689. }
690.
691. protected function smartyOutputContent($content)
321. $this->{'displayAjax' . $action}();
322. } elseif (method_exists($this, 'displayAjax')) {
323. $this->displayAjax();
324. }
325. } else {
326. $this->display();
327. }
328. } else {
329. $this->initCursedPage();
330. $this->smartyOutputContent($this->layout);
331. }
513. if (isset($params_hook_action_dispatcher)) {
514. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
515. }
516.
517. // Running controller
518. $controller->run();
519.
520. // Execute hook dispatcher after
521. if (isset($params_hook_action_dispatcher)) {
522. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
523. }
23. * @copyright Since 2007 PrestaShop SA and Contributors
24. * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25. */
26.
27. require dirname(__FILE__).'/config/config.inc.php';
28. Dispatcher::getInstance()->dispatch();