Bug 19345

Summary: SendMail error does not display error message in password recovery
Product: Koha Reporter: David Bourgault <david.bourgault>
Component: OPACAssignee: David Bourgault <david.bourgault>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, jonathan.druart, katrin.fischer, m.de.rooy, mtj
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:
Attachments: Bug 19345 - Add missing error flag to template
Bug 19345 - Add missing error flag to template
Bug 19345 - Add missing error flag to template

Description David Bourgault 2017-09-19 17:37:38 UTC
If the call to SendPasswordRecoveryEmail(...) in opac-password-recovery.pl fails, a error message should be displayed, but it's not.

To reproduce:
- Force SendPasswordRecoveryEmail() failure
    - Easiest way is to the file opac-password-recovery.pl and replace the
      'elsif (SendPassword...' at line 131 by 'elsif ( 0 ) {'
- Attempt to recover a user's password with valid login+email combo.

A message saying "An error has occurred while sending you the password recovery link." should be displayed, but it is not.
Comment 1 David Bourgault 2017-09-19 17:40:04 UTC
Created attachment 67221 [details] [review]
Bug 19345 - Add missing error flag to template

Adds a missing error flag to the template->param { } call.

To test : same procedure as above, after applying patch. Error message
will display correctly.
Comment 2 Mark Tompsett 2017-09-19 18:01:15 UTC
Created attachment 67223 [details] [review]
Bug 19345 - Add missing error flag to template

Adds a missing error flag to the template->param { } call.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 3 Marcel de Rooy 2017-10-06 06:06:36 UTC
Created attachment 67667 [details] [review]
Bug 19345 - Add missing error flag to template

Adds a missing error flag to the template->param { } call.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2017-10-06 06:07:37 UTC
Updated assignee field.
If you pick up a bug, please change the Assignee field, David.
Thanks.
Comment 5 Jonathan Druart 2017-10-06 15:17:38 UTC
First patch in, David, congrats!

Pushed to master for 17.11, thanks to everybody involved!
Comment 6 Fridolin Somers 2017-10-27 13:25:28 UTC
Pushed to 17.05.x, will be in 17.05.06.
Comment 7 Katrin Fischer 2017-10-29 18:51:20 UTC
This patch has been pushed to 16.11.x and will be in 16.11.14.
Comment 8 Mason James 2017-11-23 23:24:02 UTC
Pushed to 16.05.x, for 16.05.19 release