When a patron has an empty first name and surname, JS crashes on the patrons list page, causing the patron list to fail to load. To reproduce: 1. Create a new or edit existing patron and set the "First Name" as empty and "Surname" as whitespace (' '), so both name and surname are empty. 2. Go to the patron search page and search to load the patron list, which will lead to JS crash and patron list not loading. 3. The error can be found in the console of your browser "Uncaught TypeError: Cannot read properties of undefined (reading 'name')"
Patch that I will post below is a hotfix that we implemented on our production to somehow fix the issue but we did not do deep enough research to figure out if this is the right way to go about it and maybe it would be better to instead populate patron.library.name.
Created attachment 168830 [details] [review] Bug 37327: JS crash on patrons list when there is patron with empty name To reproduce: 1. Create a new or edit existing patron and set the "First Name" as empty and "Surname" as whitespace (' '), so both name and surname are empty. 2. Go to the patron search page and do the search to load the patron list, which will lead to JS crash and patron list not loading. 3. Apply the patch. 4. Do step 2 again, this time the patron list should load properly.
It looks like this is duplicate to bug 37368 that is a more complete fix. *** This bug has been marked as a duplicate of bug 37368 ***