Help Desk

Network activated plugin randomly deactivating – multisite

  • Posts: 19 Topics: 2
    | Permalink

    I’ve never experienced an issue like this before and have been using the event calendar and event aggregator for over a year. For the past three weeks or so I keep having the Event’s Calendar plugin “Network Deactivate” itself.

    I do have the plugin activated on a few single sites in my network as well, and they are all staying activated. There were a few fatal errors that were related to the The Events calendar, but those have cleared up with recent updates that tribe has put out, and yet the calendar keeps randomly deactivating.

    No action that I take seems to cause it to deactivate, and there are no errors being logged in wordpress logs or syslog.

    On the network Events setting screen I’ve entered my Events aggregator License, and I’ve tried to turn on Full logging under the network events help screen, but there is no “save” button, and the logging keeps reverting back to “disabled”.

    Since I’m having no issues with other plugins, no related errors in my logs, and since this issues just started a few weeks ago I’m assuming there is some function built into the Event calendar that is purposefully deactivating the plugin for some reason? Any guidance, or help getting the network level logging for event calendar to turn on would be appreciated.

    Posts: 19 Topics: 2
    | Permalink

    I wanted to add that I turned on wordpress debugging for the last few hours on my production site, and the plugin did do it’s “random” deactivation. Unfortunately nothing recorded in the debug log either. Very strange…

    Posts: 5926
    | Permalink

    Hi Daniel,

    Thanks so much for reaching out!

    I’m not quite sure why this issue is occurring.

    As a first step, let’s try to rule out if there is some type of conflict at play.
    This is usually because of:

    • A conflict with another plugin
    • A conflict with your WordPress theme
    • A template customization for the Events Calendar that requires updating

    When it comes to that type of issue, it is preferable to troubleshoot in a staging environment if you have one.

    A first quick test is to simply temporarily revert back to a default WordPress theme such as twenty-sixteen to see if the issue persists.

    The next step would be to go through our testing for conflicts procedure and let us know what you find out.

    Basically the goal here is to revert back to a bare WordPress installation to see if the problem persists. It also allows us to pinpoint what the cause of the issue is.

    But, before you do that, there are 2 things I would advise:

    • Make a backup of your database
    • Consider activating a “Maintenance Page” plugin if you are doing this on your live site (to minimize impact on your visitors)

    Let me know how that goes!

     

    Thanks,

    Jaime

    Posts: 19 Topics: 2
    | Permalink

    Basically the goal here is to revert back to a bare WordPress installation to see if the problem persists. It also allows us to pinpoint what the cause of the issue is.

    The problem is that it literally seems to be random. Sometimes it stays active for a day or more, other times it’s a few hours.

    I’m running 60+ plugins and addons and a bunch of custom code. Since there are no UI errors, and nothing being logged, I would have to literally try every combination and wait… and wait…

    Also, my development environment doesn’t have any traffic. Since the error literally is random, it is probably being triggered by some specific action by one of my users or a specific setting on a specific site. Just trying a specific set of themes/ plugins won’t tell me if the error is fixed unless we know how to trigger the error.

    Since there are no fatal errors being logged which may cause wordpress to deactivate the plugin, it seems most likely that it is deactivating itself deactivate_plugins( plugin_basename( __FILE__ ) ); because of???

    Let’s start with getting the network wide debug log to turn on. Should there be a “save” button that is not showing up for me, or if I choose “Full debug” should it save the setting via ajax? Will the debug log show errors or plugin deactivations?

    Posts: 18146 Topics: 17 Answers: 973
    | Permalink

    Hi, Daniel.

    Let’s start with getting the network wide debug log to turn on. Should there be a “save” button that is not showing up for me, or if I choose “Full debug” should it save the setting via ajax?

    It should update via ajax. In the context of the network admin environment this seems to be broken, unfortunately. We’ll log a bug ticket for the team to look into this.

    Will the debug log show errors or plugin deactivations?

    These specific logging facilities aim to capture event (or ticket) specific problems/events, they won’t necessarily trap more general issues so may not be useful here.

    Since there are no fatal errors being logged which may cause wordpress to deactivate the plugin, it seems most likely that it is deactivating itself deactivate_plugins( plugin_basename( __FILE__ ) )

    We don’t have code in place to do this (and I’d expect to see a few more reports were this a general issue affecting usage of The Events Calendar on all multisite networks).

    This is slightly new territory for us, but a possible starting point could be to install and activate User Activity Log. This apparently tracks plugin activation and deactivation and perhaps if it successfully records this, we can match the date/time with other events and figure out the underlying cause.

    Can you give that a try?

    Posts: 19 Topics: 2
    | Permalink

    I’ve logging all plugin activations and deactivations, and the event calendar is not “being deactivated”… it is “becoming deactivated”… as in, there is absolutely nothing being logged. I did setup a canary function that attempts to reach a calendar page every minute and logs the results. Now I know when it’s happening, but it still appears to be random anywhere between 12 and 36hrs.

    Can I delete events calendar without it removing events or calendar settings on each site?

    This is a pretty obvious issue so other multisite users should notice it if it was happening to all of them. Not at all sure why this would be happening just to events calendar and why it started suddenly a few weeks ago…

    Posts: 19 Topics: 2
    | Permalink

    Also, forgot to add, this is now confirmed on my development site as well. That at least confirms that it is a plugin/ theme issue rather than a database gremlin.

    Still have no clue how no errors related to the calendar are being logged.

    Posts: 5926
    | Permalink

    Hi Daniel,

    Can I delete events calendar without it removing events or calendar settings on each site?

    The information will stay in your database, however the calendar and events will not stay on your site for viewing without the plugin activated.

    Unfortunately, since we do not have other users reporting this issue, it seems to be an isolated situation.

    Instead of manually turning off all plugins/themes, another option would be for you to install the third-party plugin, Health Check, which can mimic a bare WordPress install while your site visitors still see your site the way that it normally appears.

    Let me know how that goes!

     

    Thanks,

    Jaime

    Posts: 65
    | Permalink

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

    | Permalink
    Posts: 6518
    | Permalink

    Hi there

    Just wanted to share with you that a new release of our plugins is out, including a fix for this issue 🙂

    Find out more about this release → https://theeventscalendar.com/maintenance-release-for-the-week-of-22-october-2018/

    We apologize for the delay and appreciate your patience while we worked on this.

    As always, we suggest to set up a dev/staging site so you can make all plugin updates without disrupting the live site.

    Please update the plugins and see if the fix works for your site.

    Thanks

    Courtney