Bug 25174 - Plugins that fail to load should still display in the plugins table, but with an error indicator
Summary: Plugins that fail to load should still display in the plugins table, but with...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 24631
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-16 17:48 UTC by Kyle M Hall
Modified: 2022-01-21 14:58 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2020-04-16 17:48:01 UTC
Right now, if a plugin does not load, for example, because it relies on a Koha subroutine that doesn't exist in this version of Koha, it simply disappears from the table of installed plugins. We should instead allow it to show in the table with and icon that indicates it is not loadable, and perhaps the error message from the attempt to load it.
Comment 1 Tomás Cohen Arazi 2020-04-17 14:16:49 UTC
I tried to implement this, but the fact it relies on a successful ->new prevents us from succeeding. We really need to put each plugin in its own subdirectory (to identify them individually) and have a metadata file we can refer to.
Comment 2 Kyle M Hall 2020-04-20 18:09:54 UTC
(In reply to Tomás Cohen Arazi from comment #1)
> I tried to implement this, but the fact it relies on a successful ->new
> prevents us from succeeding. 

Yes, that's why I made it dependent on the metadata bug. Once we have that, we should be able to quickly know which plugins are installed, eval them, and know if they aren't loading.

> We really need to put each plugin in its own
> subdirectory (to identify them individually) and have a metadata file we can
> refer to.

That's a great idea! I'm going to file a bug for that and submit a patch!