• Hello,

    I’m the “In the dashboard” tool to set unload rules for the admin dashboard.

    As an example, I tried unloading BetterDocs plugin from the admin side like this:
    https://ibb.co/qpZBTBs

    But it didn’t work. Still, when I check the Network tab of developers tools, I see some files of BetterDocs are being loaded all around the dashboard.

    I tried unchecking the “Make an exception” and totally unload the plugin from the dashboard (just to test if it works at all or not), and again, it still loaded the assets in the dashboard.

    Any idea why this happens? Is there any specific RegEx(es) that will work in the case where a specific word is included in the URL? (I’ve read your topic on your site but still couldn’t make it work on our site)

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @dadparvar I’ve installed the BetterDocs plugin and made a few tests. The RegEx you used is good. It works well and only if the URI contains “doc”, it will make the exception and load the plugin. There’s something I noticed: the menu for “BetterDocs” is also hidden (which is normal since the plugin is unloaded) and it’s difficult to navigate to it because you need to first visit a page that loads the plugin to view all the menu links from BetterDocs.

    I’ll implement quite soon an experimental option in the plugin that will load via AJAX the Dashboard’s sidebar and top menu as if all the plugins are all loaded (via an AJAX call, the HTML will be updated). This way, all the navigation links will be there from all the plugins ??

    What assets are loading in the Dashboard from BetterDocs? Can you check the top admin bar menu within “Asset CleanUp Pro”? There should be a notice about all the unloaded plugins and BetterDocs should be on the list. If it’s not, for some reason the RegEx doesn’t apply on your website, which would be really surprising.

    Thread Starter Hamed Azimi

    (@dadparvar)

    Thanks, Gabe,

    As you can see here: https://ibb.co/GvLDBY1

    It seems like nothing is unloaded. When I visit any admin page, I still can see js files from the BetterDocs are being loaded: https://ibb.co/HKXZH8N (in other words, as you mentioned, apparently the RegEx doesn’t apply in my case)

    Do you have any idea why this is happening?

    It is critical for us to unload the plugins from the pages that are not related. We have 50+ plugins and the dashboard is very slow (Thanks to your plugin, we improved the front-end a lot though)

    (Also, thanks for the fix. Looking forward to getting that hotfix)

    Plugin Author Gabe Livan

    (@gabelivan)

    @dadparvar Can you remove the ‘load exception’ for the plugin and see if at least the site-wide rule takes effect? Also, update to the latest version of the plugin (Asset CleanUp Pro) and just put in the exception area the following: #doc# – let’s make it as easy as possible! Let me know how it goes!

    Indeed, exactly the same settings that I’ve applied are working well for me. The PHP version shouldn’t matter match as the RegEx should even work with PHP 5.6 as well (in case you’re still using it).

    PS: There’s something that just crossed my mind (a similar problem that another user recently had). The constant define('WPACU_ALLOW_DASH_PLUGIN_FILTER', true); needs to be placed BEFORE require_once(ABSPATH . 'wp-settings.php');, and never AFTER, as it might not work. Please check this as well!

    Thread Starter Hamed Azimi

    (@dadparvar)

    The require_once ABSPATH . 'wp-settings.php'; in my config.php is all the way to the end. There is nothing after it.

    define('WPACU_ALLOW_DASH_PLUGIN_FILTER', true); on the other hand, is right before the /* That's all, stop editing! Happy publishing. */. This means they are as you expect.

    This is some of the server’s info, in case it helps you, but I would say server-side everything looks fine: https://ibb.co/MMKXkQN

    I’ve tried removing the exception and unloading the plugin globally in the dashboard, and still, nothing happens.

    Not sure if it’s useful, but just in case, we are using WordPress Multisite. Maybe there is some sort of incompatibility?

    Another thing that comes to my mind, is that we also use WP-Hide plugin and we changed our admin URL from wp-admin to something else. (if that matters?). I encountered a couple of conflicts between these 2 plugins, but I’m not sure if this is another conflict or not.

    @gabelivan I have got the same problem as @dadparvar on a multisite. Plugin manager for admin dashboard works fine in a regular site, but not in a multisite. Plugin manager for frontend does seem to work.

    The plugin in general seems to work in a multisite. Just not the Plugin manager for admin dashboard as far as I can see.

    I have tried to activate the plugins both on network and site level. In both cases it’s not working.

    Like I said, it works fine in a regular single site.

    @gabelivan can you fix this? Thanks

    • This reply was modified 3 years, 3 months ago by jaapjvh.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Unload plugins from dashboard’ is closed to new replies.