SchmidtSon Posted December 12, 2021 Share Posted December 12, 2021 Hey there, i have a Problem with the Hook Position in Backend the Postition doesn´t shown. When i set the Shop into debug mode it displays this: [PrestaShopDatabaseException] Column 'active' in field list is ambiguous<br /><br /><pre>SELECT h.id_hook, h.name as h_name, title, description, h.position, hm.position as hm_position, m.id_module, m.name, active FROM `ps_hook_module` hm STRAIGHT_JOIN `ps_hook` h ON (h.id_hook = hm.id_hook AND hm.id_shop = 1) STRAIGHT_JOIN `ps_module` as m ON (m.id_module = hm.id_module) ORDER BY hm.position</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. } can´t find the Solution. Info for the Shop: Domain: www.know-more-stylez.de Version: PrestaShop-Version 1.7.7.2 Link to comment Share on other sites More sharing options...
Nickz Posted December 12, 2021 Share Posted December 12, 2021 12 minutes ago, SchmidtSon said: When i set the Shop into debug mode it displays this: When doing what exactly? What page do you call for? Link to comment Share on other sites More sharing options...
SchmidtSon Posted December 12, 2021 Author Share Posted December 12, 2021 hey nickz, so I have done nothing at all except the customer the store set up again then, now he reported and told me that he sees no positions in the backend. After that I turned on the debug mode and lo and behold, this appears now, unfortunately my php and database knowledge are not the best, so I can not find the error here: www.know-more-stylez.de Link to comment Share on other sites More sharing options...
SchmidtSon Posted December 12, 2021 Author Share Posted December 12, 2021 i get the actually version of the hooks.php by github and insert it. After that the hooks works, but the shop doesn´t work on mobile Device. Link to comment Share on other sites More sharing options...
SmartDataSoft Posted December 13, 2021 Share Posted December 13, 2021 Hello, @SchmidtSon Can you check your database hook table the active column existing in the table. the error related to column missing. Link to comment Share on other sites More sharing options...
SchmidtSon Posted December 13, 2021 Author Share Posted December 13, 2021 hey @SmartDataSoft in which database table? i´ve looked into ps_hook and there is a active column. Look at my screenshot Link to comment Share on other sites More sharing options...
Iberactiv Posted December 17, 2021 Share Posted December 17, 2021 @SchmidtSon I had a similar problem, on Prestashop 1.7.7.8 . I solved it by editing the file classes/hook.php, in lines 483 - 484: $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS( 'SELECT h.id_hook, h.name as h_name, title, description, h.position, hm.position as hm_position, m.id_module, m.name, active Just changed active by h.active, like this: $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS( 'SELECT h.id_hook, h.name as h_name, title, description, h.position, hm.position as hm_position, m.id_module, m.name, h.active 2 Link to comment Share on other sites More sharing options...
SchmidtSon Posted December 18, 2021 Author Share Posted December 18, 2021 @Iberactiv Thank u very much, what a simple solution 😄 it works. Best regards Patrick Link to comment Share on other sites More sharing options...
Gummiwutzel Posted January 23, 2022 Share Posted January 23, 2022 Same Problem. 😬 I have no idea what I'm doing, but: It works! GREAT! 😁 Thanks for the tip, I was afraid I would have to throw myself in front of a bus... Link to comment Share on other sites More sharing options...
Nickz Posted January 23, 2022 Share Posted January 23, 2022 3 minutes ago, Gummiwutzel said: Thanks for the tip, I was afraid I would have to throw myself in front of a bus... Have a back up ready before Link to comment Share on other sites More sharing options...
Gummiwutzel Posted January 23, 2022 Share Posted January 23, 2022 (edited) Of course, however the backend page /Design/Positions (Hooks) was almost empty which was related to this issue. This is problematic when you have to make changes. After the change, it's back in full. And my mood is good again. 😃 Edited January 23, 2022 by Gummiwutzel (see edit history) Link to comment Share on other sites More sharing options...
Yulia Vitun Posted August 31, 2022 Share Posted August 31, 2022 (edited) On 12/17/2021 at 1:35 PM, Iberactiv said: @SchmidtSon I had a similar problem, on Prestashop 1.7.8.7 . I solved it by editing the file classes/hook.php, in lines 483 - 484: $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS( 'SELECT h.id_hook, h.name as h_name, title, description, h.position, hm.position as hm_position, m.id_module, m.name, active Just changed active by h.active, like this: $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS( 'SELECT h.id_hook, h.name as h_name, title, description, h.position, hm.position as hm_position, m.id_module, m.name, h.active PS 1.7.6.5 - changes to be done in line 404 - it Works ! Edited September 1, 2022 by Yulia Vitun (see edit history) 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