How to resolve a failed plugin
On some websites I have used the Events Calendar from Modern Tribe. Some of you have the professional version installed. On or around the 21st of October 2016 a problem occurred where the authors released a new version of the plugin which caused several sites to crash. This is a very rare event, however it can be frustrating when it happens, and worse still what do you do about it?
With this particular problem the sites were critically affected meaning you could not login or do anything. When accessing the site; all you would see is a white screen with a message on it saying a script had failed.
In this case the message looked similar to this:
Fatal error: Class ‘Tribe__PUE__Package_Handler’ not found in /home/risu3a12/public_html/wp-content/plugins/the-events-calendar/common/src/Tribe/PUE/Checker.php on line 200
I would not normally expect my client base to know what to do other than see there is a problem. However there is something you can do which will get your site back online quickly albeit with some reduced functionality, this should work in most cases where a plugin fails.
What to check
If you see a message appear where your website was, the first thing to do is copy it and send it to me. I will get to it as soon as I can. For those of you that reported it back to me when it occurred you will know that my response time was within a few hours of you telling me about it.
Here is something you can do for Plugin related problems. Look at the message, and note that the path to the problem script includes the text
This tells me it is a plugin problem, so it automatically isolates the problem to a specific area of your website. Looking a little further, the plugin is called The Events Calendar
With that knowledge you can locate the folder which contains the code for that plugin and rename it. If you rename it the website will not be able to run the code (because it is has moved to a new location), and if it was the code in the plugin that was causing the problem then it has been bypassed. You will find the website is back up and running, but without the calendar plugin working in this case.
How do I do this?
Depending on your skill level you may wish to pass the problem to me and I will handle it. If you want to have a go, then you need access to the control panel for your website. You may already have this, if you haven’t then request it and I will provide it to you.
You log into your control panel (a different location to the admin address for your website) by going to http://(my website homepage address)/cpanel Substitute “my website homepage address” with your home page address. You will see a user name and password is requested. Enter that.
On the next page is a set of icons. Look for the File Manager icon and click on it. Then navigate to the folder /public_html.
This is generally the root directory of your website. In some cases it isn’t so if you cannot locate this folder do not take any further action in case you break something.
Once in /public_html/ look for wp-content, then plugins. This will place you in the directory where all of the plugins are located.
Next you look carefully at the error code produced by your website. In this case it showed the-events-calendar.
Locate the folder with that name and rename it to the-events-calendar-broken and save the change. The code is still on your site, however your website cannot access it anymore because the path to it is no longer valid. So it will simply skip over it.
If you return to the users view of the website, you will see it is now running. However the plugin you have effectively disabled is not running, so you have lost some functionality.
Right now is a good time to back up the entire website. Login and go to Settings, UpdraftPlus and backup the site and download the backup before you do anything else.
What happens next depends on the plugin. So I will comment on this particular case, bearing in mind that several days have elapsed, generally it may take +24hrs or more before a patch or fix is available from the author.
Log into the website as an administrator and check to see if there are any outstanding upgrades pending. Your site generally updates these once a day. If the plugin that you just disabled has an upgrade pending. Run the update. In this case new code was installed and the problem was resolved.
Don’t forget to go back to the File Manager and delete the directory you renamed. You will see that the original directory has been created again as a result of updating the plugin. It may have cleaned it up for you, but it is best to check and verify.
Things to note in this process
Taking these actions retained any data associated with the plugin in the database. So all of the calendar entries were ok and unaffected. It may have been possible to delete and restore the plugin, however that may have deleted the data in the data base as well. It usually does not, however you cannot be sure. So it is best to take care if you find yourself in this situation.