Title: Serious BUG: Plugin Ordering Deactivation Error
Last modified: January 23, 2017

---

# Serious BUG: Plugin Ordering Deactivation Error

 *  Resolved [Paul](https://wordpress.org/support/users/paultgoodchild/)
 * (@paultgoodchild)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/serious-bug-plugin-ordering-deactivation-error/)
 * Just discovered a horrific little bug in your plugin when it comes to deactivating
   other plugins on the site.
 * Yes, this has been tested – I had to disable every plugin on my site to track
   it down.
 * When your plugin is active, and I deactivate any plugin on my site, it not only
   deactivates the plugin I wanted to deactivate, but it also deactivates a 2nd “
   random” plugin from the the site too.
 * When I say random, it just appears to be random, but actually it is the plugin
   that appears “last” in the order of plugins to be activated when WordPress loads.
   I.e. the last plugin in the array taken from the option “active_plugins”.
 * So, there’s a bug in your forceful “ordering” logic or your freemius insertion
   logic, and you’re actually dropping 1 extra item OFF the “active_plugins” array,
   causing a 2nd plugin to be **silently** deactivated each time another plugin 
   is deactivated on the site. Since plugins get “deactivated” when you upgrade 
   a plugin too, every time you upgrade a plugin on a site, you deactivate another
   plugin.
 * #ouch! If you’re going to mess with WordPress core options like this, test the
   complete bag out of it, please!
 * Thanks! 🙂
    -  This topic was modified 9 years, 4 months ago by [Paul](https://wordpress.org/support/users/paultgoodchild/).
    -  This topic was modified 9 years, 4 months ago by [Paul](https://wordpress.org/support/users/paultgoodchild/).
    -  This topic was modified 9 years, 4 months ago by [Paul](https://wordpress.org/support/users/paultgoodchild/).
    -  This topic was modified 9 years, 4 months ago by [Paul](https://wordpress.org/support/users/paultgoodchild/).

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Vova Feldman](https://wordpress.org/support/users/svovaf/)
 * (@svovaf)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/serious-bug-plugin-ordering-deactivation-error/#post-8692962)
 * Hi [@paultgoodchild](https://wordpress.org/support/users/paultgoodchild/),
 * My name is Vova Feldman, and I’m the lead dev at Freemius. Thanks for reporting
   the issue, we are taking it very seriously and will do our best to resolve it
   asap. Obviously, we have a very thorough testing process and the bug you describe
   is something that we hear for the first time.
 * I’d love to work this out with you – if you give me the chance. I need to know
   the following:
    1. Freemius SDK version 2. Your plugins list 3. Your WP language
 * To get the info about Freemius, activate NextGEN and go to `/wp-admin/admin.php?
   page=freemius`. Could you please send me a screenshot of that page + a screenshot
   of your plugins list to [support AT freemius DOT com]?
 * Thanks!
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/serious-bug-plugin-ordering-deactivation-error/#post-8697946)
 * [@svovaf](https://wordpress.org/support/users/svovaf/) – Thanks for jumping in
   here Vova, although we think we have this sorted out in our next release which
   we are still testing … and have made available as a beta.
 * [@paultgoodchild](https://wordpress.org/support/users/paultgoodchild/) – Thanks
   for bringing this to our attention, we are still doing some final testing before
   putting out a stable release.
 * In the meantime, you are welcome to try our latest beta as it should also correct
   this issue. Here’s a link: [https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/beta/](https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/beta/)
 * Thanks!
 * – Cais.
 *  [Vova Feldman](https://wordpress.org/support/users/svovaf/)
 * (@svovaf)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/serious-bug-plugin-ordering-deactivation-error/#post-8698298)
 * [@photocrati](https://wordpress.org/support/users/photocrati/) was the issue 
   related to Freemius?
 *  Thread Starter [Paul](https://wordpress.org/support/users/paultgoodchild/)
 * (@paultgoodchild)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/serious-bug-plugin-ordering-deactivation-error/#post-8705434)
 * Hey guys… this bug is reproducible with any combination of plugins.
 * I can fix the problem immediately by not running `fix_loading_order()` in your`
   nggallery.php`
 * We run an important plugin for website management and the plugin file begins 
   with “w”. This means our plugin is found near the end of the active_plugins array,
   so our customers constantly having our plugin deactivated. It’s causing a real
   problem. Could you please test and push this update asap?
 * Thanks!
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/serious-bug-plugin-ordering-deactivation-error/#post-8707071)
 * [@svovaf](https://wordpress.org/support/users/svovaf/) – No, this is not “Freemius”
   related.
 * [@paultgoodchild](https://wordpress.org/support/users/paultgoodchild/) – As noted
   the beta will correct this, have you tested it and found that was not the case?
 * – Cais.
 *  Thread Starter [Paul](https://wordpress.org/support/users/paultgoodchild/)
 * (@paultgoodchild)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/serious-bug-plugin-ordering-deactivation-error/#post-8707230)
 * Yep, tested it. appears to solve the issue…
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/serious-bug-plugin-ordering-deactivation-error/#post-8716092)
 * [@paultgoodchild](https://wordpress.org/support/users/paultgoodchild/) – Thanks
   for taking the time to test the beta. We should have it out as the next stable
   release later today or tomorrow.
 * – Cais.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Serious BUG: Plugin Ordering Deactivation Error’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

## Tags

 * [deactivate plugins](https://wordpress.org/support/topic-tag/deactivate-plugins/)

 * 7 replies
 * 3 participants
 * Last reply from: [photocrati](https://wordpress.org/support/users/photocrati/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/serious-bug-plugin-ordering-deactivation-error/#post-8716092)
 * Status: resolved