Bug 17461

Summary: Make plugins-home.pl complain about plugins that can not be loaded
Product: Koha Reporter: Magnus Enger <magnus>
Component: Architecture, internals, and plumbingAssignee: Magnus Enger <magnus>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: katrin.fischer, kyle
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18090
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 17461 - Warn about plugins that can't be loaded
Bug 17461 - Warn about plugins that can't be loaded
Bug 17461: Warn about plugins that can't be loaded

Description Magnus Enger 2016-10-18 09:46:31 UTC
I tried to install an older version of the KitchenSink plugin, but it did not show up in the list of plugins. And there was nothing interesting in the logs either. So how do I figure out what the problem is? See attached patch for my solution.
Comment 1 Magnus Enger 2016-10-18 09:54:17 UTC
Created attachment 56620 [details] [review]
Bug 17461 - Warn about plugins that can't be loaded

The logs should have some info if a module has been installed that can
not be loaded.

To test:
- Make sure you have an up to date dev install
- Install v1.0 of the KitchenSink plugin from
  https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases
- Make sure the plugin does not show up in the list of installed
  plugins, and that the intranet-error.log has no info about it
- Apply the patch
- Reload plugins-home.pl
- Verify that there is now some interesting info in intranet-error.log
Comment 2 Liz Rea 2017-02-08 01:03:22 UTC
Created attachment 59997 [details] [review]
Bug 17461 - Warn about plugins that can't be loaded

The logs should have some info if a module has been installed that can
not be loaded.

To test:
- Make sure you have an up to date dev install
- Install v1.0 of the KitchenSink plugin from
  https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases
- Make sure the plugin does not show up in the list of installed
  plugins, and that the intranet-error.log has no info about it
- Apply the patch
- Reload plugins-home.pl
- Verify that there is now some interesting info in intranet-error.log

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Works as advertised, generates useful diagnostic information in the form of a log entry to either intranet-error or plack-error.log. Relief, thanks Magnus!



 Current patch-complexity: Trivial patch
Comment 3 Tomás Cohen Arazi 2017-02-08 18:31:23 UTC
Created attachment 60034 [details] [review]
Bug 17461: Warn about plugins that can't be loaded

The logs should have some info if a module has been installed that can
not be loaded.

To test:
- Make sure you have an up to date dev install
- Install v1.0 of the KitchenSink plugin from
  https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases
- Make sure the plugin does not show up in the list of installed
  plugins, and that the intranet-error.log has no info about it
- Apply the patch
- Reload plugins-home.pl
- Verify that there is now some interesting info in intranet-error.log

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Works as advertised, generates useful diagnostic information in the form of a log entry to either intranet-error or plack-error.log. Relief, thanks Magnus!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Kyle M Hall 2017-02-17 17:19:34 UTC
Pushed to master for 17.05, thanks Magnus!
Comment 5 Katrin Fischer 2017-02-19 20:59:28 UTC
This is marked an enh, but a small change that will be helpful in stable releases as well to help people locate problems with plugins. 

This patch has been pushed to 16.11.x and will be in 16.11.04.