Bug 22559

Summary: OPAC Forgotten password functionality not working
Product: Koha Reporter: Liz Rea <wizzyrea>
Component: OPACAssignee: Liz Rea <wizzyrea>
Status: CLOSED FIXED QA Contact: Tomás Cohen Arazi <tomascohen>
Severity: critical    
Priority: P5 - low CC: jonathan.druart, martin.renvoize, nick, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 22048    
Bug Blocks:    
Attachments: Bug 22559: Restore OPAC forgotten password functionality
Bug 22559: Restore OPAC forgotten password functionality
Bug 22559: Restore OPAC forgotten password functionality

Description Liz Rea 2019-03-21 16:41:07 UTC
Trying to reset a password using the forgotten password OPAC functionality seems to fail with one of a couple of messages: 

Can't call method "catch" without a package or object reference at /home/vagrant/kohaclone/opac/opac-password-recovery.pl line 158

or 

Can't call method "isa" on an undefined value at /home/vagrant/kohaclone/opac/opac-password-recovery.pl line 159

This seems to happen after commit f822dee088b86edecd5d5c73718ad9f8a04c0664

To reproduce:

Enable OpacResetPassword 
Create a borrower with a username and password
Go to the OPAC, try to reset the password (I always get the reset link out of the message_queue in the database rather than worry about receiving the actual email. You do you.)
Go to the link provided.
Attempt to set a password, this should fail.
Comment 1 Liz Rea 2019-03-21 17:13:26 UTC
Created attachment 86854 [details] [review]
Bug 22559: Restore OPAC forgotten password functionality

To test:

Enable OpacResetPassword
Create a borrower with a username and password
Go to the OPAC, try to reset the password (I always get the reset link
        token out of the message_queue in the database rather than worry about
        receiving the actual email. You do you.)
Go to the link provided.
Attempt to set a password, this should fail.
Apply this patch, restart the things
Go through the process again, password should be reset.
Comment 2 Jonathan Druart 2019-03-21 17:25:35 UTC
Created attachment 86857 [details] [review]
Bug 22559: Restore OPAC forgotten password functionality

To test:

Enable OpacResetPassword
Create a borrower with a username and password
Go to the OPAC, try to reset the password (I always get the reset link
        token out of the message_queue in the database rather than worry about
        receiving the actual email. You do you.)
Go to the link provided.
Attempt to set a password, this should fail.
Apply this patch
Go through the process again, password should be reset.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Tomás Cohen Arazi 2019-03-21 18:17:32 UTC
Created attachment 86859 [details] [review]
Bug 22559: Restore OPAC forgotten password functionality

To test:

Enable OpacResetPassword
Create a borrower with a username and password
Go to the OPAC, try to reset the password (I always get the reset link
        token out of the message_queue in the database rather than worry about
        receiving the actual email. You do you.)
Go to the link provided.
Attempt to set a password, this should fail.
Apply this patch
Go through the process again, password should be reset.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Nick Clemens 2019-03-22 20:34:38 UTC
Awesome work all!

Pushed to master for 19.05
Comment 5 Martin Renvoize 2019-03-25 14:40:59 UTC
The enhancement that caused this was not backported to 18.11.x series.