I'm seeing an error in main when submitting a patron update from the OPAC. It seems to happen only when the submission includes a date of birth value. It happens when adding a new date of birth value (previously empty), when submitting a change to the date of birth value, or when submitting the form without changing the date of birth field. It doesn't seem to be connected to the dateofbirth system preference choice. Can't call method "dateofbirthrequired" on an undefined value at /kohadevbox/koha/opac/opac-memberentry.pl line 539
Created attachment 182722 [details] [review] Bug 38974: Fix error in OPAC patron update Test plan: 1) Make sure Patron category is checked in the system preference PatronSelfModificationBorrowerUnwantedField 2) Log in to the opac 3) Go to "Personal details" 4) Select any value for "Date of birth" 5) Click save 6) This must not yield error 500. (But may be a successful save or a validation error).
Created attachment 182746 [details] [review] Bug 38974: Fix error in OPAC patron update Test plan: 1) Make sure Patron category is checked in the system preference PatronSelfModificationBorrowerUnwantedField 2) Log in to the opac 3) Go to "Personal details" 4) Select any value for "Date of birth" 5) Click save 6) This must not yield error 500. (But may be a successful save or a validation error). Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using KTD): 1. The "Patron category (categorycode)" field to select for PatronSelfModificationBorrowerUnwantedField is about three quarters of the way down the list on the left-hand side.
Please fill assignee field when taking a bug.
Looks like this is affected too by this change: if ( $borrower->{'password'} ) { my ( $is_valid, $error ) = Koha::AuthUtils::is_password_valid( $borrower->{password}, Koha::Patron::Categories->find( $borrower->{categorycode} || C4::Context->preference('PatronSelfRegistrationDefaultCategory') And should be more correct now (when updating).
Created attachment 183053 [details] [review] Bug 38974: Fix error in OPAC patron update Test plan: 1) Make sure Patron category is checked in the system preference PatronSelfModificationBorrowerUnwantedField 2) Log in to the opac 3) Go to "Personal details" 4) Select any value for "Date of birth" 5) Click save 6) This must not yield error 500. (But may be a successful save or a validation error). Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Nice work everyone! Pushed to main for 25.11
Nice work everyone! Pushed to 25.05.x for 25.05.03
*** Bug 40499 has been marked as a duplicate of this bug. ***
Pushed to 24.11.x for 24.11.08