[Bug 15795] New: C4/Members.pm is floody
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 Bug ID: 15795 Summary: C4/Members.pm is floody Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: mtompset@hotmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com A warn without a prepended $debug is causing floodiness when NorwegianPatronDB is not set. -- 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=15795 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|C4/Members.pm is floody |C4/Members.pm is floody | |(Norwegian Patron DB) -- 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=15795 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |mtompset@hotmail.com |ity.org | Status|NEW |ASSIGNED Severity|enhancement |trivial --- Comment #1 from M. Tompsett <mtompset@hotmail.com> --- Though I can't see how to trigger it, except by deleting ~/kohaclone/Koha/NorwegianPatronDB.pm, there probably should be a $debug prepended on the warn. -- 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=15795 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 47881 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47881&action=edit Bug 15795: C4/Members.pm is floody (Norwegian Patron DB)
From the mailing list: "I'm working on 3.22.02 and my logs are FILLED with the following warnings:
Members.pm: Unable to load Koha::NorwegianPatronDB at /blurred/C4/Members.pm line 46., referer: http://blurred/cgi-bin/koha/acqui/booksellers.pl admin-home.pl: Unable to load Koha::NorwegianPatronDB at /blurred/C4/Members.pm line 46., referer: http://blurred/cgi-bin/koha/admin/preferences.pl" I agree. Looking at C4/Members.pm other warns are all prepended with $debug. TEST PLAN --------- 1) rm Koha/NorwegianPatronDB.pm -- quickest and dirtiest way to get the load to fail. 2) echo > ~/koha-dev/var/log/koha-error_log -- so it will be easy to spot the log changes. -- back up the log file if you really want it. 3) log into the staff client and go to patrons. -- Check the log file. "Unable to load ..." will be there. 4) echo > ~/koha-dev/var/log/koha-error_log 5) sudo vi /etc/apache2/sites-enabled/{your koha site file} -- Find your staff client entry in your apache configuration file and add: SetEnv DEBUG 1 6) sudo service apache2 restart 7) apply the patch 8) refresh the patron page -- "Unable to load..." will still be there. 9) change the DEBUG value in your apache config to 0 10) sudo sevice apache2 restart 11) echo > ~/koha-dev/var/log/koha-error_log 12) refresh the patron page -- "Unable to load..." will NOT be there. 13) git checkout origin/master -- Koha/NorwegianPatronDB.pm -- to bring it back. 14) refresh the patron page -- "Unable to load..." will still not be there. 15) run koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- See the conversation on Nabble: http://koha.1045719.n5.nabble.com/Introduce-the-use-of-Grunt-or-Gulp-tp58733... Sadly, it got inter-threaded. The dangers of just replying in order to create a new thread. :( -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Depends on| |15151 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 [Bug 15151] t/Circulation_barcodedecode.t fails if no DB present -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #4 from Magnus Enger <magnus@libriotech.no> --- How about getting rid of both the if and the warn? So from this: use Module::Load::Conditional qw( can_load ); if ( ! can_load( modules => { 'Koha::NorwegianPatronDB' => undef } ) ) { warn "Unable to load Koha::NorwegianPatronDB"; } to this: use Module::Load::Conditional qw( can_load ); can_load( modules => { 'Koha::NorwegianPatronDB' => undef } ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Magnus Enger from comment #4)
How about getting rid of both the if and the warn? So ... this:
use Module::Load::Conditional qw( can_load ); can_load( modules => { 'Koha::NorwegianPatronDB' => undef } );
While functional, I think warns are a good thing. I would rather keep the potential to warn, hence my patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 --- Comment #6 from Blou <philippe.blouin@inlibro.com> --- Created attachment 47902 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47902&action=edit [SIGNED-OFF] Bug 15795: C4/Members.pm is floody (Norwegian Patron DB)
From the mailing list: "I'm working on 3.22.02 and my logs are FILLED with the following warnings:
Members.pm: Unable to load Koha::NorwegianPatronDB at /blurred/C4/Members.pm line 46., referer: http://blurred/cgi-bin/koha/acqui/booksellers.pl admin-home.pl: Unable to load Koha::NorwegianPatronDB at /blurred/C4/Members.pm line 46., referer: http://blurred/cgi-bin/koha/admin/preferences.pl" I agree. Looking at C4/Members.pm other warns are all prepended with $debug. TEST PLAN --------- 1) rm Koha/NorwegianPatronDB.pm -- quickest and dirtiest way to get the load to fail. 2) echo > ~/koha-dev/var/log/koha-error_log -- so it will be easy to spot the log changes. -- back up the log file if you really want it. 3) log into the staff client and go to patrons. -- Check the log file. "Unable to load ..." will be there. 4) echo > ~/koha-dev/var/log/koha-error_log 5) sudo vi /etc/apache2/sites-enabled/{your koha site file} -- Find your staff client entry in your apache configuration file and add: SetEnv DEBUG 1 6) sudo service apache2 restart 7) apply the patch 8) refresh the patron page -- "Unable to load..." will still be there. 9) change the DEBUG value in your apache config to 0 10) sudo sevice apache2 restart 11) echo > ~/koha-dev/var/log/koha-error_log 12) refresh the patron page -- "Unable to load..." will NOT be there. 13) git checkout origin/master -- Koha/NorwegianPatronDB.pm -- to bring it back. 14) refresh the patron page -- "Unable to load..." will still not be there. 15) run koha qa test tools Signed-off-by: Philippe Blouin <philippe.blouin@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #47881|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #7 from Blou <philippe.blouin@inlibro.com> --- Although I would prefer Magnus' code snippet overall, because it's less ugly than the big "if" that gives too much importance to that feature IMO, adding $debug is following the standard and expectations. I like standards... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Blou from comment #7)
Although I would prefer Magnus' code snippet overall, because it's less ugly
-- totally agree.
than the big "if" that gives too much importance to that feature IMO, adding $debug is following the standard and expectations.
I like standards...
And the discussion on development mailing list may end up turning this functionality into a plug-in in the future, but until then, this suffices. +1 to future plugin. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 47948 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47948&action=edit Bug 15795: C4/Members.pm is floody (Norwegian Patron DB)
From the mailing list: "I'm working on 3.22.02 and my logs are FILLED with the following warnings:
Members.pm: Unable to load Koha::NorwegianPatronDB at /blurred/C4/Members.pm line 46., referer: http://blurred/cgi-bin/koha/acqui/booksellers.pl admin-home.pl: Unable to load Koha::NorwegianPatronDB at /blurred/C4/Members.pm line 46., referer: http://blurred/cgi-bin/koha/admin/preferences.pl" I agree. Looking at C4/Members.pm other warns are all prepended with $debug. TEST PLAN --------- 1) rm Koha/NorwegianPatronDB.pm -- quickest and dirtiest way to get the load to fail. 2) echo > ~/koha-dev/var/log/koha-error_log -- so it will be easy to spot the log changes. -- back up the log file if you really want it. 3) log into the staff client and go to patrons. -- Check the log file. "Unable to load ..." will be there. 4) echo > ~/koha-dev/var/log/koha-error_log 5) sudo vi /etc/apache2/sites-enabled/{your koha site file} -- Find your staff client entry in your apache configuration file and add: SetEnv DEBUG 1 6) sudo service apache2 restart 7) apply the patch 8) refresh the patron page -- "Unable to load..." will still be there. 9) change the DEBUG value in your apache config to 0 10) sudo sevice apache2 restart 11) echo > ~/koha-dev/var/log/koha-error_log 12) refresh the patron page -- "Unable to load..." will NOT be there. 13) git checkout origin/master -- Koha/NorwegianPatronDB.pm -- to bring it back. 14) refresh the patron page -- "Unable to load..." will still not be there. 15) run koha qa test tools Signed-off-by: Philippe Blouin <philippe.blouin@inlibro.com> Signed-off-by: Marcel de Rooy <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=15795 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=8483 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |brendan@bywatersolutions.co | |m Attachment #47902|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #10 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in the May 2016 release. (Just a note one of the previous patches wasn't obsolete - I followed up on that). Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |julian.maurice@biblibre.com --- Comment #11 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.4 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15795 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #12 from Frédéric Demians <frederic@tamil.fr> --- This patch has been pushed to 3.20.x, will be in 3.20.9. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org