Jump to content
marco2308

Missing actionAuthenticationBefore hook PS 1.7.6.0

Recommended Posts

Hello!

I just installed Prestashop 1.7.6.0 (localhost installation), just an empty brand new installation of Prestashop, with no modules or 3d part themes installed,

I wrote my own module to override Prestashop login.

my module simply declare an hook on its own install function:

$this->registerHook('actionAuthenticationBefore') 

and manage my own code through the function hookActionAuthenticationBefore() in my module.

the hook 'actionAuthenticationBefore' is listed in official PS documentation https://devdocs.prestashop.com/1.7/modules/concepts/hooks/list-of-hooks/

and it is executed in CustomerLoginForm class (in submit() function)

the problem is that when the hook is executed (Hook::exec('actionAuthenticationBefore')) return false because there is no record with name 'actionAuthenticationBefore' in ps_hook table in db.

Is this a bug ? I can't figured out why this hook should not be in that table, it should be officially part of prestashop hooks and there is an alias declared in hook_alias table.

Can anyone help me to report this bug?

 

Edited by marco2308 (see edit history)

Share this post


Link to post
Share on other sites
On 9/24/2019 at 12:54 PM, marco2308 said:

Hello!

I just installed Prestashop 1.7.6.0 (localhost installation), just an empty brand new installation of Prestashop, with no modules or 3d part themes installed,

I wrote my own module to override Prestashop login.

my module simply declare an hook on its own install function:

$this->registerHook('actionAuthenticationBefore') 

and manage my own code through the function hookActionAuthenticationBefore() in my module.

the hook 'actionAuthenticationBefore' is listed in official PS documentation https://devdocs.prestashop.com/1.7/modules/concepts/hooks/list-of-hooks/

and it is executed in CustomerLoginForm class (in submit() function)

the problem is that when the hook is executed (Hook::exec('actionAuthenticationBefore')) return false because there is no record with name 'actionAuthenticationBefore' in ps_hook table in db.

Is this a bug ? I can't figured out why this hook should not be in that table, it should be officially part of prestashop hooks and there is an alias declared in hook_alias table.

Can anyone help me to report this bug?

 

Hi, I have encountered the same problem. Looking at the hook table the name seems to be actionbeforeauthentication. I hope it helps!

Share this post


Link to post
Share on other sites
On 11/12/2019 at 6:00 PM, Creativo2 said:

Hi, I have encountered the same problem. Looking at the hook table the name seems to be actionbeforeauthentication. I hope it helps!

It looks like a bug in PrestaShop. The quick workaround that I did is I manually updated the values in ps_hook table from "actionbeforeauthentication" to the correct hook name "actionAuthenticationBefore".

Share this post


Link to post
Share on other sites

This is still not fixed as of PS 1.7.6.4

CustomerLoginForm.php says actionAuthenticationBefore
Database does not contain the hook, but instead says actionbeforeauthentication

How can I report this to the developers so that this is addressed in the future version?

Thank you.

Share this post


Link to post
Share on other sites
1 hour ago, hamsn said:

This is still not fixed as of PS 1.7.6.4

CustomerLoginForm.php says actionAuthenticationBefore
Database does not contain the hook, but instead says actionbeforeauthentication

How can I report this to the developers so that this is addressed in the future version?

Thank you.

Here https://github.com/PrestaShop/PrestaShop/issues/new/choose

  • Thanks 1

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

×
×
  • Create New...

Important Information

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