Bug 40499 - Birthdate on Patron Self Modification Form Causes an Error When Form is Submitted
Summary: Birthdate on Patron Self Modification Form Causes an Error When Form is Submi...
Status: RESOLVED DUPLICATE of bug 38974
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 24.11
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-24 17:34 UTC by Chris Slone
Modified: 2025-07-24 19:17 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***