[Bug 9883] New: Koha::Plugins::Base should not require koha-conf to load
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Bug ID: 9883 Summary: Koha::Plugins::Base should not require koha-conf to load Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: blocker Priority: P5 - low Component: Tools Assignee: kyle.m.hall@gmail.com Reporter: jcamins@cpbibliography.com This line: push @INC, C4::Context->config("pluginsdir"); means that Koha::Plugins::Base cannot be loaded without a koha-conf.xml file present and pointed to by the KOHA_CONF environment variable. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 16570 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16570&action=edit Bug 9883 - Koha::Plugins::Base should not require koha-conf to load Test Plan: 1) Run t/db_dependent/Plugins.t 2) Apply patch 3) Re-run t/db_dependent/Plugins.t -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #16570|0 |1 is obsolete| | --- Comment #2 from Magnus Enger <magnus@enger.priv.no> --- Created attachment 16597 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16597&action=edit Bug 9883 - Koha::Plugins::Base should not require koha-conf to load Test Plan: 1) Run t/db_dependent/Plugins.t 2) Apply patch 3) Re-run t/db_dependent/Plugins.t Signed-off-by: Magnus Enger <magnus@enger.priv.no> The tests pass both before and after the patch. I can see no ill effects on the functionality (tried uploading and accessing the Kitchen Sink plugin). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Some notes about my testing: After applying the patch the tests still failed, after talking to Kyle I realized I should make sure that my conf is current. So I am rerunning Makefile.pl doing an upgrade. 3 new dependencies are listed: - Archive::Zip - could be installed with apt-get libarchive-zip-perl - Archive::Extract - no package? - Module::Bundled::Files - no package? Module::Bundled::Files seems to make the test fail, but according to the output of koha_perl_deps.pl -m it should not be required. Archive::Extract is not listed by the script at all, but only by Makefile.PL. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Koha::Plugins::Base should |Koha::Plugins::* should not |not require koha-conf to |require koha-conf to load |load | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |ASSIGNED --- Comment #4 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- It turns out I misunderstood the error message. The problem is not the modification to @INC (though that should definitely be removed if it is unnecessary) but rather the inclusion of C4::Auth. C4::Auth should be loaded with require, at runtime. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #16597|0 |1 is obsolete| | --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 16640 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16640&action=edit [PASSED QA] Bug 9883 - Koha::Plugins::Base should not require koha-conf to load Test Plan: 1) Run t/db_dependent/Plugins.t 2) Apply patch 3) Re-run t/db_dependent/Plugins.t Signed-off-by: Magnus Enger <magnus@enger.priv.no> The tests pass both before and after the patch. I can see no ill effects on the functionality (tried uploading and accessing the Kitchen Sink plugin). Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> After installing libmodule-bundled-files-perl from the debian.koha-community.org I ran through Makefile.PL updating my conf file successfully. Also all tests and QA script pass now. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |ASSIGNED --- Comment #6 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Sorry, I should have been more clear in my last update. I would *also* like a follow-up adjusting the use C4::Auth to a require. The patch currently on the bug will go in as-is, but rather than adding yet another bug to Bugzilla, I figure it makes more sense to change the title and consolidate. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 16710 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16710&action=edit Bug 9883 - Koha::Plugins::* should not require koha-conf to load - Followup - Load C4::Auth at run time -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to comment #6)
Sorry, I should have been more clear in my last update. I would *also* like a follow-up adjusting the use C4::Auth to a require. The patch currently on the bug will go in as-is, but rather than adding yet another bug to Bugzilla, I figure it makes more sense to change the title and consolidate.
I'm having a bit of difficulty following your line of though. Is this followup what you were looking for? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 16727 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16727&action=edit Bug 9883 - Add missing parameter to koha-conf.xml causing Plugins.t to fail -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 --- Comment #10 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Anything in a BEGIN block gets run at compile time. I was thinking of using "require C4::Auth" right before C4::Auth routines are required. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to comment #10)
Anything in a BEGIN block gets run at compile time. I was thinking of using "require C4::Auth" right before C4::Auth routines are required.
Thanks! I'll replace that followup with a more sensible one. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #16710|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=9890 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 16777 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16777&action=edit Bug 9883 - Koha::Plugins::* should not require koha-conf to load - Followup - Load C4::Auth at run time -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 16782 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16782&action=edit Bug 9883 - Create plugins dir in Makefile -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #16782|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 16786 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16786&action=edit Bug 9883 - Koha::Plugins::Base should not require koha-conf to load Test Plan: 1) Run t/db_dependent/Plugins.t 2) Apply patch 3) Re-run t/db_dependent/Plugins.t Signed-off-by: Magnus Enger <magnus@enger.priv.no> The tests pass both before and after the patch. I can see no ill effects on the functionality (tried uploading and accessing the Kitchen Sink plugin). Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> After installing libmodule-bundled-files-perl from the debian.koha-community.org I ran through Makefile.PL updating my conf file successfully. Also all tests and QA script pass now. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #16727|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #16777|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #16786|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 16787 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16787&action=edit [PASSED QA] Bug 9883 - Add missing parameter to koha-conf.xml causing Plugins.t to fail Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 16788 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16788&action=edit [PASSED QA] Bug 9883 - Koha::Plugins::* should not require koha-conf to load - Followup - Load C4::Auth at run time Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Unset KOHA_CONF variable and made sure t/00_load.t passed Also ran Makefile.PL doing an update on my existing installation and checked koha-conf.xml: <pluginsdir>/home/katrin/koha-dev/var/lib/plugins</pluginsdir> <enable_plugins>0</enable_plugins> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9883 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #17 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org