xcoder777 Posted January 18, 2017 Share Posted January 18, 2017 Hello dear Prestashop forum, i switched debug and development mod on and found this error. I am optimizing my shop and want to know how to fix it [PrestaShopDatabaseException]Unknown column 'tcps.id_shop' in 'where clause' SELECT SQL_NO_CACHE tcp.*, cl.`name` FROM ps_tmcategoryproducts tcp LEFT JOIN ps_tmcategoryproducts_shop tcps ON (tcp.`id_tab` = tcps.`id_tab`) LEFT JOIN ps_category_lang cl ON (tcp.`category` = cl.`id_category`) WHERE tcps.`id_shop` = 1 AND cl.`id_lang` = 3 AND cl.`id_shop` = 1 AND tcp.`mode` = 1 AND tcp.`status` = 1 at 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] DbCore->query - [line 102 - tools/profiling/Db.php] - [1 Arguments] Db->query - [line 643 - classes/db/Db.php] - [1 Arguments] DbCore->executeS - [line 697 - modules/tmcategoryproducts/tmcategoryproducts.php] - [1 Arguments] Tmcategoryproducts->getTabList - [line 707 - modules/tmcategoryproducts/tmcategoryproducts.php] - [2 Arguments] Tmcategoryproducts->getTabListCategoriesIds - [line 764 - modules/tmcategoryproducts/tmcategoryproducts.php] - [1 Arguments] Tmcategoryproducts->hookDisplayHome - [line 595 - classes/Hook.php] - [1 Arguments] HookCore::coreCallHook - [line 542 - classes/Hook.php] - [3 Arguments] HookCore::exec - [line 40 - controllers/front/IndexController.php] - [1 Arguments] IndexControllerCore->initContent - [line 220 - tools/profiling/Controller.php] Controller->run - [line 367 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] Link to comment Share on other sites More sharing options...
vekia Posted January 18, 2017 Share Posted January 18, 2017 it looks like your module table in database does not have id_shop column there are two possibilities: first: add id_shop column int(3) to table ps_tmcategoryproducts second: modify query in the module file (remove where clause that checks id_shop column) 1 Link to comment Share on other sites More sharing options...
tokatti Posted April 18, 2020 Share Posted April 18, 2020 On 1/18/2017 at 11:41 PM, vekia said: it looks like your module table in database does not have id_shop column there are two possibilities: first: add id_shop column int(3) to table ps_tmcategoryproducts second: modify query in the module file (remove where clause that checks id_shop column) Hello I have same problém. how do I write it specifically? thank you Tomas 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