Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A disabled plugin MUST NOT be loaded!
#1
@ccagle8:

The GS 3.0 approach of disabling plugins does only work in some limited cases. It seems that only the hooks are disabled but the plugins are still loaded. This leads to several problems:
  • Some plugins do checks when they are loaded, which cause problems on some systems. Disabling the plugin does not remove the problems
  • Templates might still call the functions (as the plugins are loaded) - the user might get no error message but wonders why the output is wrong. E.g. I18N will still output the navigation, but it will never be updated because the savechanges hook is never called.
  • Plugins check for the existance of other plugins, e.g. the I18N plugin, by checking if a function exists. It does exist, but the plugin might return invalid results or even produce errors (see above)
  • Users don't always report they have disabled plugins, as they expect (rightly) that a disabled plugin does not influence the system - thus it is much harder to find some errors.

I like the idea of disabling plugins and it would simplify testing with/without I18N plugin immensely, if it worked correctly: If a plugin is disabled, it MUST NOT be loaded.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#2
Unfortunately the system as it is must read each file to get the plugin information, name etc...

And yes your right if its disabled it shouldn't load or do any function related to the plugin itself.

Leave it with me for for a bit, I'll come up with something....

Mike...
My Github Repos: Github
Website: DigiMute
Reply
#3
n00dles101 Wrote:Unfortunately the system as it is must read each file to get the plugin information, name etc...

Yes, I agree, thus a plugin is initially enabled.
But as the plugin rules say that the plugin name is the same as its filename there is no need to read it again, once it is disabled.

You can cache the plugin information in an XML.
Or - I suppose - you can read all plugins when displaying the plugin list, it shouldn't do any harm. But don't load the plugins at any other time.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#4
Ok fixed it in the latest SVN.

As were reading in the file to get all relevant information on the plugin I've had to change the plugin Management screen to just display the Filename and "Disabled Plugin"

FYI the code chage is line 44 of plugin_fucntions.php to the following:

Code:
foreach ($live_plugins as $file=>$en) {
  $pluginsLoaded=true;
  if ($en=='true' && file_exists(GSPLUGINPATH . $file)){
      require_once(GSPLUGINPATH . $file);
  } else {
      register_plugin( pathinfo_filename($file), $file, '', 'Unknown', '', 'Disabled Plugin', '', '');
  }
}
My Github Repos: Github
Website: DigiMute
Reply




Users browsing this thread: 1 Guest(s)