[Bug 28167] New: A warning when setting which library to use in intranet and UseCashRegisters is disabled
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28167 Bug ID: 28167 Summary: A warning when setting which library to use in intranet and UseCashRegisters is disabled Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: joonas.kylmala@helsinki.fi QA Contact: testopia@bugs.koha-community.org CC: martin.renvoize@ptfs-europe.com Depends on: 24786 If you have UseCashRegisters set to "Don't use" and in intranet try to change a library you are currently logged in at (/cgi-bin/koha/circ/set-library.pl) then you get the following warning in the logs: plack-intranet-error.log:
Use of uninitialized value $register_id in string ne at /usr/share/koha/intranet/cgi-bin/circ/set-library.pl line 81.
Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24786 [Bug 24786] Allow setting a cash register for a login session and configuring library-default cash registers -- 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=28167 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27126 CC| |jonathan.druart@bugs.koha-c | |ommunity.org Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27126 [Bug 27126] [OMNIBUS] Warnings from logs must be removed -- 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=28167 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |joonas.kylmala@iki.fi |ity.org | CC| |joonas.kylmala@iki.fi -- 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=28167 Bug 28167 depends on bug 24786, which changed state. Bug 24786 Summary: Allow setting a cash register for a login session and configuring library-default cash registers https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24786 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28167 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28167 --- Comment #1 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 139966 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139966&action=edit Bug 28167: Remove uninitialized variable warnings from circ/set-library.pl With UseCashRegisters syspref disabled going to the page /cgi-bin/koha/circ/set-library.pl in staff interface and setting a library gives the following errors in plack-intranet-error.log: Use of uninitialized value $register_id in string ne at /kohadevbox/koha/circ/set-library.pl line 79. Use of uninitialized value $referer in pattern match (m//) at /kohadevbox/koha/circ/set-library.pl line 114. In the if clause $userenv_register_id appears to be typoed, it should have been $register_id as $userenv_register_id is always defined. As for the $referer variable, it is undef if there is no referer so let's just initialize it to an empty string for the regex so it doesn't give the warning. To test: 1) Go directly to /cgi-bin/koha/circ/set-library.pl by typing it in the URL bar and set a library 2) Make sure plack-intranet-error.log doesn't contain the above mentioned errors after applying this patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28167 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=28167 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139966|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 140505 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140505&action=edit Bug 28167: Remove uninitialized variable warnings from circ/set-library.pl With UseCashRegisters syspref disabled going to the page /cgi-bin/koha/circ/set-library.pl in staff interface and setting a library gives the following errors in plack-intranet-error.log: Use of uninitialized value $register_id in string ne at /kohadevbox/koha/circ/set-library.pl line 79. Use of uninitialized value $referer in pattern match (m//) at /kohadevbox/koha/circ/set-library.pl line 114. In the if clause $userenv_register_id appears to be typoed, it should have been $register_id as $userenv_register_id is always defined. As for the $referer variable, it is undef if there is no referer so let's just initialize it to an empty string for the regex so it doesn't give the warning. To test: 1) Go directly to /cgi-bin/koha/circ/set-library.pl by typing it in the URL bar and set a library 2) Make sure plack-intranet-error.log doesn't contain the above mentioned errors after applying this patch 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=28167 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140505|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 140569 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140569&action=edit Bug 28167: Remove uninitialized variable warnings from circ/set-library.pl With UseCashRegisters syspref disabled going to the page /cgi-bin/koha/circ/set-library.pl in staff interface and setting a library gives the following errors in plack-intranet-error.log: Use of uninitialized value $register_id in string ne at /kohadevbox/koha/circ/set-library.pl line 79. Use of uninitialized value $referer in pattern match (m//) at /kohadevbox/koha/circ/set-library.pl line 114. In the if clause $userenv_register_id appears to be typoed, it should have been $register_id as $userenv_register_id is always defined. As for the $referer variable, it is undef if there is no referer so let's just initialize it to an empty string for the regex so it doesn't give the warning. To test: 1) Go directly to /cgi-bin/koha/circ/set-library.pl by typing it in the URL bar and set a library 2) Make sure plack-intranet-error.log doesn't contain the above mentioned errors after applying this patch Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28167 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice catch Joonas, cleans up the warning nicely and no regressions found. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28167 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28167 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28167 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28167 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|22.11.00 |22.11.00, 22.05.07 released in| | --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.07 release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28167 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable CC| |arthur.suzuki@biblibre.com Version(s)|22.11.00, 22.05.07 |22.11.00, 22.05.07, released in| |21.11.14 --- Comment #7 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- applied to 21.11 for 21.11.14 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28167 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org