[Bug 28699] New: Noisy warns in checkauth when patron has no firstname
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28699 Bug ID: 28699 Summary: Noisy warns in checkauth when patron has no firstname Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Firstname field is not required, however, we try to log it in checkauth: 888 Koha::Logger->get->debug(sprintf "AUTH_SESSION: (%s)\t%s %s - %s", map { $session->param($_) || "" } qw(cardnumber firstname surname branch)); This causes a warn in the logs: [2021/07/09 13:22:54] [WARN] Use of uninitialized value in sprintf at /kohadevbox/koha/C4/Auth.pm line 888. To recreate: 1 - Remove first name from a patron 2 - tail -f /var/log/koha/kohadev/plack-opac-error.log 3 - Login as that patron on the opac -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28699 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28699 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 122745 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122745&action=edit Bug 28699: Allow for blank firstname in checkauth When mapping the fields from the session we should map blank fieds to blank strings To test: 1 - Remove first name from a patron 2 - tail -f /var/log/koha/kohadev/plack-opac-error.log 3 - Login as that patron on the opac 4 - Note warns in the log like: [2021/07/09 13:22:54] [WARN] Use of uninitialized value in sprintf at /kohadevbox/koha/C4/Auth.pm line 888. 5 - Apply patch 6 - restart_all 7 - Log out and in to opac with user 8 - Note warns above are gone -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28699 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28699 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28699 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122745|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 122758 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122758&action=edit Bug 28699: Allow for blank firstname in checkauth When mapping the fields from the session we should map blank fieds to blank strings To test: 1 - Remove first name from a patron 2 - tail -f /var/log/koha/kohadev/plack-opac-error.log 3 - Login as that patron on the opac 4 - Note warns in the log like: [2021/07/09 13:22:54] [WARN] Use of uninitialized value in sprintf at /kohadevbox/koha/C4/Auth.pm line 888. 5 - Apply patch 6 - restart_all 7 - Log out and in to opac with user 8 - Note warns above are gone Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28699 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This removes unnecessary release notes| |warning messages in | |plack-opac-error.log when | |patrons have no first name. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28699 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #3 from David Cook <dcook@prosentient.com.au> --- Thank you, Nick. This has been bugging me for ages. I'll make a note to QA this later today. (I am half-tempted to pass it just because it's so simple, but I had better give at least one spin through...) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28699 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28699 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122758|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 122865 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122865&action=edit Bug 28699: Allow for blank firstname in checkauth When mapping the fields from the session we should map blank fieds to blank strings To test: 1 - Remove first name from a patron 2 - tail -f /var/log/koha/kohadev/plack-opac-error.log 3 - Login as that patron on the opac 4 - Note warns in the log like: [2021/07/09 13:22:54] [WARN] Use of uninitialized value in sprintf at /kohadevbox/koha/C4/Auth.pm line 888. 5 - Apply patch 6 - restart_all 7 - Log out and in to opac with user 8 - Note warns above are gone Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> [EDIT] Replaced || by //, since we talk here about uninitialized. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28699 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28699 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE CC| |jonathan.druart+koha@gmail. | |com Status|Passed QA |RESOLVED --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I fixed that earlier this week with a follow-up on bug 28606 commit af7e41d1142573666d302a8475274ea58e5c99f4 Bug 28606: Remove warning from C4::Auth 887 *** This bug has been marked as a duplicate of bug 28606 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org