Bug 40499

Summary: Birthdate on Patron Self Modification Form Causes an Error When Form is Submitted
Product: Koha Reporter: Chris Slone <cslone>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: lucas
Version: 24.11   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Chris Slone 2025-07-24 17:34:48 UTC
This seems to have been introduced with the .05 or .06 point upgrade. Patrons with a birthdate in their record are not able to successfully submit a request to modify their personal details of dateofbirth is a field that's allowed on the Personal Details page.

See the following message on every failed form submission in the plack-error.log:

'Can't call method "dateofbirthrequired" on an undefined value at /usr/share/koha/opac/cgi-bin/opac/opac-memberentry.pl line 539.'


To recreate:
1. Set OPACPatronDetails to Allow
2. Make sure dateofbirth is not included in PatronSelfModificationBorrowerUnwantedField or in  PatronSelfModificationMandatoryField 
3. Log in as a patron with no birthdate in their record, change a detail on the Personal Details page, submit, get a confirmation message.
4. Log in as a patron with a birthdate set, change a detail on the Personal Details page, submit, receive a 500 error.
5. If the birthdate is removed (either via the staff client or by just clearing it on the patron form) the request is able to go through successfully 

Workaround:
Set dateofbirth in PatronSelfModificationBorrowerUnwantedField so that it is no longer an option on the Personal Details page
Comment 1 Chris Slone 2025-07-24 17:37:42 UTC
And of note: this does not seem to be an issue when the server is upgraded to 25.05.
Comment 2 Lucas Gass (lukeg) 2025-07-24 19:17:03 UTC

*** This bug has been marked as a duplicate of bug 38974 ***