Dodomand Posted August 25, 2015 Share Posted August 25, 2015 Dear Prestashop forum. I have been experiencing that the product page on my store was only showing the text from the productcomment module. This i fixed by removing the hook from the left side column, however during this process i got to a point were i now have these errors: [PrestaShopDatabaseException]Subquery returns more than 1 row SELECT IFNULL( ( SELECT left_column FROM ps_theme t LEFT JOIN ps_theme_meta tm ON ( t.id_theme = tm.id_theme ) LEFT JOIN ps_meta m ON ( m.id_meta = tm.id_meta ) WHERE t.id_theme =4 AND m.page = "index" ) , default_left_column ) FROM ps_theme WHERE id_theme =4 LIMIT 1at line 791 in file classes/db/Db.php 786. if ($webservice_call && $errno) {787. $dbg = debug_backtrace();788. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {790. if ($sql) {791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');792. }793.794. throw new PrestaShopDatabaseException($this->getMsgError());795. }796. } DbCore->displayError - [line 425 - classes/db/Db.php] - [1 Arguments]420. $this->result = $this->_query($sql);421. }422. }423.424. if (_PS_DEBUG_SQL_) {425. $this->displayError($sql);426. }427.428. return $this->result;429. }430. DbCore->query - [line 690 - classes/db/Db.php] - [1 Arguments]685. $this->last_cached = true;686. return $result;687. }688. }689.690. $this->result = $this->query($sql);691. if (!$this->result) {692. $result = false;693. } else {694. $result = $this->nextRow($this->result);695. } DbCore->getRow - [line 723 - classes/db/Db.php] - [2 Arguments]718. {719. if ($sql instanceof DbQuery) {720. $sql = $sql->build();721. }722.723. if (!$result = $this->getRow($sql, $use_cache)) {724. return false;725. }726.727. return array_shift($result);728. } Argument [0]SELECT IFNULL( ( SELECT left_column FROM ps_theme t LEFT JOIN ps_theme_meta tm ON ( t.id_theme = tm.id_theme ) LEFT JOIN ps_meta m ON ( m.id_meta = tm.id_meta ) WHERE t.id_theme =4 AND m.page = "index" ) , default_left_column ) FROM ps_theme WHERE id_theme =4Argument [1]1 DbCore->getValue - [line 302 - classes/Theme.php] - [1 Arguments]297. WHERE t.id_theme ='.(int)$this->id.'298. AND m.page = "'.pSQL($page).'" ) , default_left_column299. )300. FROM '._DB_PREFIX_.'theme301. WHERE id_theme ='.(int)$this->id302. );303. }304.305. public function hasRightColumn($page = null)306. {307. return (bool)Db::getInstance()->getValue( Argument [0]SELECT IFNULL( ( SELECT left_column FROM ps_theme t LEFT JOIN ps_theme_meta tm ON ( t.id_theme = tm.id_theme ) LEFT JOIN ps_meta m ON ( m.id_meta = tm.id_meta ) WHERE t.id_theme =4 AND m.page = "index" ) , default_left_column ) FROM ps_theme WHERE id_theme =4 ThemeCore->hasLeftColumn - [line 4942 - modules/themeeditor/themeeditor.php] - [1 Arguments]4937. $cart_style = Configuration::get($this->configName.'_cart_style');4938. if($header_style == 2)4939. $cart_style = 1;4940.4941. $inc = 0;4942. if ((Context::getContext()->theme->hasLeftColumn($this->context->controller->php_self)))4943. $inc++;4944. if ((Context::getContext()->theme->hasRightColumn($this->context->controller->php_self)))4945. $inc++;4946. 4947. $theme_settings = array( ThemeEditor->hookHeader - [line 587 - classes/Hook.php] - [1 Arguments]582. }583. }584.585. // Immediately return the result if we do not log performances586. if (!Module::$_log_modules_perfs) {587. return $module->{$method}($params);588. }589.590. // Store time and memory before and after hook call and save the result in the database591. $time_start = microtime(true);592. $memory_start = memory_get_usage(true); HookCore::coreCallHook - [line 544 - classes/Hook.php] - [3 Arguments]539.540. // Call hook method541. if ($hook_callable) {542. $display = Hook::coreCallHook($moduleInstance, 'hook'.$hook_name, $hook_args);543. } elseif ($hook_retro_callable) {544. $display = Hook::coreCallHook($moduleInstance, 'hook'.$retro_hook_name, $hook_args);545. }546.547. // Live edit548. if (!$array_return && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad')549. && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions' HookCore::exec - [line 579 - classes/controller/FrontController.php] - [1 Arguments]574.575. if (!$this->useMobileTheme()) {576. // These hooks aren't used for the mobile theme.577. // Needed hooks are called in the tpl files.578. $this->context->smarty->assign(array(579. 'HOOK_HEADER' => Hook::exec('displayHeader'),580. 'HOOK_TOP' => Hook::exec('displayTop'),581. 'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''),582. 'HOOK_RIGHT_COLUMN' => ($this->display_column_right ? Hook::exec('displayRightColumn', array('cart' => $this->context->cart)) : ''),583. ));584. } else { FrontControllerCore->initContent - [line 37 - controllers/front/IndexController.php]32. * Assign template vars related to page content33. * @see FrontController::initContent()34. */35. public function initContent()36. {37. parent::initContent();38. $this->addJS(_THEME_JS_DIR_.'index.js');39.40. $this->context->smarty->assign(array('HOOK_HOME' => Hook::exec('displayHome'),41. 'HOOK_HOME_TAB' => Hook::exec('displayHomeTab'),42. 'HOOK_HOME_TAB_CONTENT' => Hook::exec('displayHomeTabContent') IndexControllerCore->initContent - [line 189 - classes/controller/Controller.php]184. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {185. $this->initHeader();186. }187.188. if ($this->viewAccess()) {189. $this->initContent();190. } else {191. $this->errors[] = Tools::displayError('Access denied.');192. }193.194. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) { ControllerCore->run - [line 367 - classes/Dispatcher.php]362. if (isset($params_hook_action_dispatcher)) {363. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);364. }365.366. // Running controller367. $controller->run();368. } catch (PrestaShopException $e) {369. $e->displayMessage();370. }371. }372. DispatcherCore->dispatch - [line 28 - index.php]23. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)24. * International Registered Trademark & Property of PrestaShop SA25. */26.27. require(dirname(__FILE__).'/config/config.inc.php');28. Dispatcher::getInstance()->dispatch(); Could any of you help me to how i could solve some of these issues?Best regards Link to comment Share on other sites More sharing options...
Dodomand Posted August 26, 2015 Author Share Posted August 26, 2015 Anyone? Link to comment Share on other sites More sharing options...
Frits van Leeuwen Posted October 4, 2015 Share Posted October 4, 2015 Terrible. I've got the same problem. Link to comment Share on other sites More sharing options...
Frits van Leeuwen Posted October 4, 2015 Share Posted October 4, 2015 I coppied 1.6.1.1 by FTP. I overide every file. Then the problem was fixed. But I have still an other problem. Link to comment Share on other sites More sharing options...
tuk66 Posted October 5, 2015 Share Posted October 5, 2015 There is a problem with the database. Some records are wrong. Find the records and change/remove them. Link to comment Share on other sites More sharing options...
Frits van Leeuwen Posted October 5, 2015 Share Posted October 5, 2015 How do I find them? Where do I have to look for? Link to comment Share on other sites More sharing options...
tuk66 Posted October 5, 2015 Share Posted October 5, 2015 I can't describe it. It fully depends on your data. Link to comment Share on other sites More sharing options...
Frits van Leeuwen Posted October 6, 2015 Share Posted October 6, 2015 I only get a other problem left. But that's in an other topic. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now