Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable plugin fails when folder does not match case of Plugin Name in array #1750

Closed
peregrine-web opened this issue Dec 10, 2013 · 2 comments
Milestone

Comments

@peregrine-web
Copy link

in library/core/pluginmanager.php

change around line 1035 in vanilla 2.1b2

from

// 2. Perform necessary hook action
$this->_PluginHook($PluginName, self::ACTION_DISABLE, TRUE);

to

   $RealRoot = GetValue('RealRoot', $Plugin);
   $PluginName = preg_replace('/.*plugins\//', '', $RealRoot); 
  // 2. Perform necessary hook action
  $this->_PluginHook($PluginName, self::ACTION_DISABLE, TRUE);

this will retrieve the actual folder and set the config correctly and disable the plugin.

unfortunately my connection is to slow to use github pull push, etc.

@peregrine-web
Copy link
Author

also if it were done this way you could have several versions of the same plugin in dashboard and enable and disable each one, without having to rename folder each time,

@linc linc changed the title A fix to clicking disable plugin in dashboard when plugin folder does not match the case of the Plugin Name in plugin array Disable plugin fails when folder does not match case of Plugin Name in array Feb 14, 2015
@linc linc added this to the 2.2 beta milestone Feb 21, 2015
@bleistivt
Copy link
Contributor

The documentation now says:

The array key (FancyPlugin above) must exactly match the folder name, including capitalization.
http://docs.vanillaforums.com/developers/plugins/quickstart/

So I wouldn't allow this - a wrong folder name voids your warranty.

@linc linc closed this as completed Feb 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants