[Bug 35603] New: Add plugin feature to allow plugins to warn if any external library modules needed are missing
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35603 Bug ID: 35603 Summary: Add plugin feature to allow plugins to warn if any external library modules needed are missing Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Some plugins require extra modules not included with Koha, but there is no simple way to let a user know when installing a plugin. -- 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=35603 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |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=35603 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35603 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 160008 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160008&action=edit Bug 35603: Add plugin feature to allow plugins to warn if any external library modules needed are missing Some plugins require extra modules not included with Koha, but there is no simple way to let a user know when installing a plugin. This patch allows a new metadata to be added that is a list of hashes with the key module. The hash is used for future expansion to allow new critera to be added such as minimum and maximum module version. Test Plan: 1) Install any plugin 2) In the plugin metadata, add the following key: libs => [ { module => 'Business::Barcode::EAN13' } ], 3) Apply this patch 4) Restart all the things! 5) Browse to plugins-home.pl, note the error listing the missing module 6) Install Business::Barcode::EAN13 from cpan 7) Reload the page 8) Note the error is gone! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35603 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com, | |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=35603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160008|0 |1 is obsolete| | --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 160036 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160036&action=edit Bug 35603: Add plugin feature to allow plugins to warn if any external library modules needed are missing Some plugins require extra modules not included with Koha, but there is no simple way to let a user know when installing a plugin. This patch allows a new metadata to be added that is a list of hashes with the key module. The hash is used for future expansion to allow new critera to be added such as minimum and maximum module version. Test Plan: 1) Install any plugin 2) In the plugin metadata, add the following key: libs => [ { module => 'Business::Barcode::EAN13' } ], 3) Apply this patch 4) Restart all the things! 5) Browse to plugins-home.pl, note the error listing the missing module 6) Install Business::Barcode::EAN13 from cpan 7) Reload the page 8) Note the error is gone! 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=35603 --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 160037 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160037&action=edit Bug 35603: (follow-up) Fix colspan count This isn't directly related to the bug, but was apparent whilst testing. 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=35603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Testing using my in-development crontab plugin with a 'conditional_load' branch: https://github.com/PTFS-Europe/koha-plugin-crontab/tree/conditional_load I'm catching the missing module during the install method and returning false there. This allows plugin_methods to be properly set and the plugin files to remain on the system whilst preventing the __INSTALLED__ flag being set. This means that whilst the plugin seen by Koha, it's marked with an error and displays the missing module information.. once the module is installed, the install sub runs to completion and the plugin works as expected :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35603 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35603 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35603 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@ptfs-europe.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35603 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35603 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35603 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160036|0 |1 is obsolete| | Attachment #160037|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 165975 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165975&action=edit Bug 35603: Add plugin feature to allow plugins to warn if any external library modules needed are missing Some plugins require extra modules not included with Koha, but there is no simple way to let a user know when installing a plugin. This patch allows a new metadata to be added that is a list of hashes with the key module. The hash is used for future expansion to allow new critera to be added such as minimum and maximum module version. Test Plan: 1) Install any plugin 2) In the plugin metadata, add the following key: libs => [ { module => 'Business::Barcode::EAN13' } ], 3) Apply this patch 4) Restart all the things! 5) Browse to plugins-home.pl, note the error listing the missing module 6) Install Business::Barcode::EAN13 from cpan 7) Reload the page 8) Note the error is gone! 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=35603 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #6 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- This needs a rebase, it breaks the table when the error is present -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org