A page not found error message is generated after fixing validation errors when editing a patron - where the validation/error message is shown at the top of the page (below the patron name, but before the Save and Cancel buttons). To replicate: 1. Edit a patron record (for example: Henry Acevedo). 2. Note that the URL is http://127.0.0.1:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=19 3. Change date of birth to yesterday. 4. Save. 5. Error message displayed above the Save and Cancel buttons: The following fields are wrong. Please fix them. - Patron's age is incorrect for their category. Ages allowed are 18-999. 6. Note that the URL is now http://127.0.0.1:8081/cgi-bin/koha/members/memberentry.pl 7. Fix date of birth (for example: change year to 2000). 8. Select Save. 9. Message displayed: "Patron not found. Return to search." Inline validation errors (such as for required fields) don't cause this issue.
I think it has been introduced by bug 29684
Created attachment 135465 [details] [review] Bug 30868: (bug 29684 follow-up) Fix borrowernumber var in template borrower_data does not contain the borrowernumber, it is sent separately. Test plan: 1. Edit a patron record (for example: Henry Acevedo). 2. Note that the URL is http://127.0.0.1:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=19 3. Change date of birth to yesterday. 4. Save. 5. Error message displayed above the Save and Cancel buttons: The following fields are wrong. Please fix them. - Patron's age is incorrect for their category. Ages allowed are 18-999. 6. Note that the URL is now http://127.0.0.1:8081/cgi-bin/koha/members/memberentry.pl 7. Fix date of birth (for example: change year to 2000). 8. Select Save. => Without this patch you get: "Patron not found. Return to search." => With this patch applied the patron's data is saved
Created attachment 135466 [details] [review] Bug 30868: (bug 29684 follow-up) Fix borrowernumber var in template borrower_data does not contain the borrowernumber, it is sent separately. Test plan: 1. Edit a patron record (for example: Henry Acevedo). 2. Note that the URL is http://127.0.0.1:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=19 3. Change date of birth to yesterday. 4. Save. 5. Error message displayed above the Save and Cancel buttons: The following fields are wrong. Please fix them. - Patron's age is incorrect for their category. Ages allowed are 18-999. 6. Note that the URL is now http://127.0.0.1:8081/cgi-bin/koha/members/memberentry.pl 7. Fix date of birth (for example: change year to 2000). 8. Select Save. => Without this patch you get: "Patron not found. Return to search." => With this patch applied the patron's data is saved Signed-off-by: David Nind <david@davidnind.com>
Created attachment 135719 [details] [review] Bug 30868: (bug 29684 follow-up) Fix borrowernumber var in template borrower_data does not contain the borrowernumber, it is sent separately. Test plan: 1. Edit a patron record (for example: Henry Acevedo). 2. Note that the URL is http://127.0.0.1:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=19 3. Change date of birth to yesterday. 4. Save. 5. Error message displayed above the Save and Cancel buttons: The following fields are wrong. Please fix them. - Patron's age is incorrect for their category. Ages allowed are 18-999. 6. Note that the URL is now http://127.0.0.1:8081/cgi-bin/koha/members/memberentry.pl 7. Fix date of birth (for example: change year to 2000). 8. Select Save. => Without this patch you get: "Patron not found. Return to search." => With this patch applied the patron's data is saved Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 22.11. Nice work everyone, thanks!
Pushed to 22.05.x for 22.05.01
thx pushed to 21.11.x for 21.11.07
Missing dependencies for 21.05.x, it shouldn't be affected, no backport. Nothing to document, marking resolved.