Bug 25174

Summary: Plugins that fail to load should still display in the plugins table, but with an error indicator
Product: Koha Reporter: Kyle M Hall <kyle>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, martin.renvoize, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25222
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 24631    
Bug Blocks:    

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!