Jump to content

Bug in Hook Postion


SchmidtSon
 Share

Recommended Posts

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

 

 

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

@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

 

  • Like 2

Share this post


Link to post
Share on other sites

  • 1 month later...
  • 7 months later...
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 by Yulia Vitun (see edit history)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More