phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0017798phplist applicationpluginspublic15-08-15 10:2602-10-15 19:25
Reporterduncanc 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.2.0 
Target Versionnext minorFixed in Version3.2.1 
Summary0017798: Plugin remains enabled after dependency is not met
DescriptionThis is a bit of an edge case when installing and enabling plugins.

A plugin has dependencies that are met and so is enabled. If later a dependency becomes not met then the plugin seems to remain enabled.
If you view the plugins page then the plugin is shown as having unmet dependencies but it is still actually enabled.

Depending on what the dependency actually is that might be a problem. I found this when disabling CommonPlugin and found that other plugins that had it as a dependency remained enabled and failed due to the CommonPlugin class not existing.

One solution is to verify the dependencies when loading each plugin.
See file admin/pluginlib.php. Add a test of the dependencies to this line

if (!in_array($className,$GLOBALS['plugins_disabled']) ) {

if (!in_array($className,$GLOBALS['plugins_disabled']) && pluginCanEnable($className)) {

This seems to avoid the problem but you might also want to add the plugin to the set of disabled plugins instead of just ignoring it.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0056637)
duncanc (developer)
15-08-15 14:27

I'm not correct in saying that the plugin remains enabled, rather it is "not disabled".
(0056898)
michiel (manager)
28-09-15 12:08

hmm, tricky this. Adding this check depends on the order in which plugins are loaded. I added the check and as a result could not enable a plugin that depended on the common plugin, even when the commonplugin was enabled.

So, it would need two passes to work, which is not great for performance.
(0056928)
duncanc (developer)
01-10-15 13:41

Yes, I see what you mean now.

Possibly another way is, when a plugin is disabled to also test the dependencies of all other plugins, so that a plugin which depends on the one being disabled is also disabled at the same time.
(0056929)
michiel (manager)
01-10-15 13:47

Yes, that's a good plan.
(0056941)
michiel (manager)
02-10-15 19:25

https://github.com/phpList/phplist3/pull/30 [^]


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker