Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Can a plugin disable another plugin?

BleistivtBleistivt Moderator
edited August 2014 in Vanilla 2.0 - 2.8

Hi, is there an event, that gets fired very early, so you could overwrite config settings temporarily after they are loaded?

Basically I want a plugin to "turn off" another plugin temporarily as I'm trying to solve an incompatibility between these two without having to modify the other one.


  • Options
    hgtonighthgtonight ∞ · New Moderator

    You can turn off a plugin by setting the configuration setting to false. This isn't recommended as it will bypass any code a plugin needs/wants to execute before being disabled.

    You can temporarily set a configuration item by using SaveToConfig($Name, $Value, array('Save' => FALSE));.

    You can also hook into the plugin manager and unregister the plugin you don't like:

    public function Gdn_PluginManager_AfterStart_Handler($Sender) {

    I wouldn't really suggest doing either of these. Perhaps you can expand upon your issue and we can find a better way.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    BleistivtBleistivt Moderator
    edited August 2014

    Thanks, I'm going to try that.

    My Problem: I'm using Consolidate, but it breaks the VanillaStats in the Dashboard in Firefox (not in Chrome though, seems to be more tolerant to malformed js):

    TypeError: rowStates is null
    Possibly an error with inline js code or the concatenation.

    Since it works well for the rest of my site and I don't really need it in the dashboard, I just wanted to use my utility-plugin to disable it in the dashboard.

  • Options
    peregrineperegrine MVP
    edited August 2014

    maybe you could check for dashboard controller and not load js or css that installed by plugin (either by a check on url or a check on controller. (I haven't looked at plugin, and I have not tested).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Any minifier has the potential to break things.

  • Options

    Consolidate does not minify.

    Please open a question under my plugin, if you are having issues.

    grep is your friend.

  • Options

    Ok, I did some more research.

    The solution to my problem is kind of embarrasing: I had disabled third party cookies in Firefox, so VanillaStats did not work.

    I blamed it on Consolidate for a different issue (VanillaStats doesn't work when js is deferred).

Sign In or Register to comment.