[Bug 28303] New: Having multiple pluginsdir causes plugin_upload to try to write to the opac-tmpl folder
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28303 Bug ID: 28303 Summary: Having multiple pluginsdir causes plugin_upload to try to write to the opac-tmpl folder Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: michael.hafen@washk12.org QA Contact: testopia@bugs.koha-community.org With multiple pluginsdir settings in koha-conf.xml, C4/Template::badtemplatecheck changes the config, causing plugins-upload to try to unpack plugins to the opac-tmpl folder which badtemplatecheck unshifts into the pluginsdir array in config. -- 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=28303 --- Comment #1 from Michael Hafen <michael.hafen@washk12.org> --- Created attachment 120722 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120722&action=edit Proposed fix -- 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=28303 Michael Hafen <michael.hafen@washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=28303 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28303 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=28303 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #2 from David Nind <david@davidnind.com> --- Hi Michael. Could you create a test plan for this? Then I will attempt to sign off. Thanks. David -- 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=28303 --- Comment #3 from Michael Hafen <michael.hafen@washk12.org> --- Test plan: 1. edit a koha instance's koha-conf.xml to set enable_plugins to 1 1.a restart memcached service as necessary 2. upload plugin in Administration -> Manage plugins -> Upload plugin 3. plugin will be listed in the Manage plugins page 4. create a directory, for example `mkdir -p /var/lib/koha-common/plugins` 5. edit koha-conf.xml to add a pluginsdir tag pointing to the directory created in step 4 5.a restart memcached service as necessary 6. uninstall plugin 7. try to upload plugin again. Observe error message to verify that the Apache user can write to the plugins directory. 8. apply patch 9. try to upload plugin again. It should succeed. -- 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=28303 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=28303 --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 123444 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123444&action=edit Bug 28303 - Fix plugins system with multiple pluginsdir settings C4/Templates::badtemplatecheck mucks with the config('pluginsdir') array ref. This makes sure it operates on a copy of the array. Signed-off-by: David Nind <david@davidnind.com> -- 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=28303 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120722|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Comment on attachment 120722 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120722 Proposed fix Not sure what happened here - obsoleting patch so there is only one (the signed off one). -- 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=28303 --- Comment #6 from David Nind <david@davidnind.com> --- Thanks Michael for the test plan! I have now tested and signed off. Testing notes (using koha-testing-docker): - Step 7: . I didn't see an error (maybe because I changed the user/group for the new directory to match the koha instance) . The plugin looked okay (I used ByWaterSolutions' dev-koha-plugin-kitchen-sink) but there were errors when i tried to do anything with it - it looks like it was uploaded to koha-tmpl/opac-tmpl - After applying the patch and restarting the plugin showed as having errors. After reinstalling the plugin everything was back to working as expected and i could install other plugins. Manually deleted the plugin files added to koha-tmpl/opac-tmpl/Koha/ David -- 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=28303 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |michael.hafen@washk12.org |ity.org | -- 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=28303 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |joonas.kylmala@iki.fi --- Comment #7 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Looks good but missing unit test and fails QA script: * Commit title does not start with 'Bug XXXXX: ' - b73fd7c915 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28303 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |joonas.kylmala@iki.fi |y.org | Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28303 Joonas Kylmälä <joonas.kylmala@iki.fi> 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=28303 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123444|0 |1 is obsolete| | --- Comment #8 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 125667 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125667&action=edit Bug 28303: Add unit test for badtemplatecheck This tests that pluginsdir value is not modified by the call to badtemplatecheck to make sure badtemplatecheck operates with its own copy of pluginsdir configuration value. Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28303 --- Comment #9 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 125668 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125668&action=edit Bug 28303: Fix plugins system with multiple pluginsdir settings C4/Templates::badtemplatecheck mucks with the config('pluginsdir') array ref. This makes sure it operates on a copy of the array. To test: 1) $ prove t/db_dependent/Templates.t Signed-off-by: David Nind <david@davidnind.com> JK: Fix commit message styling and add test plan Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28303 --- Comment #10 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- (In reply to Joonas Kylmälä from comment #7)
Looks good but missing unit test and fails QA script:
* Commit title does not start with 'Bug XXXXX: ' - b73fd7c915
I added the unit test and fixed the commit title. Passing QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28303 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thank you, Joonas! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28303 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.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=28303 --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28303 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.11.00 |21.11.00,21.05.05 released in| | CC| |kyle@bywatersolutions.com --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28303 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|21.11.00,21.05.05 |21.11.00,21.05.05,20.11.11 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28303 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- Comment #15 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28303 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #16 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- *** Bug 28143 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org