No software is perfect and WordPress is no exception. With all the third-party theme and plugins we use it is no wonder that some of them don’t play nice all the time, and an update that may fix one thing can break another that goes unnoticed in the background. This NextGEN Gallery error is an example of how a great plugin can have a minor error that breaks your whole WordPress website.
We’ve had a couple of WordPress websites in the last few days affected by a new error in a plugin that was preventing the website from showing, and also stopping much of the admin functionality from working. Similar to the “white screen of death” and the “403 Forbidden” errors there is an easy fix.
Exception thrown
`add_post_hook` not defined for ExtensibleObject
If you see this, don’t panic. It appears to be directly related to the popular NextGEN Gallery plugin and the latest WordPress update to 4.1.1.
Luckily we could still log in to /wp-admin/, if you can’t access yoursite.com/wp-admin then try yoursite.com/wp-login.php, if not you will have to try the alternative method.
Once logged in to the website’s dashboard, go to the “Plugins” menu item, from there it should list out your currently installed plugins. Under the NextGEN Gallery entry it should have an additional line saying “Updates available, please update now”, click the link and let the automatic updater do it’s work.
After the automatic update finished our website was working fine again running WordPress 4.1.1 with the plugins NextGEN version 2.0.76 and NextGEN Plus version 1.1.3.
If you can’t log in to wp-admin then you will have to disable the NextGEN plugin and update it manually.
Open your FTP client and connect to your website hosting, then navigate to wp-content/plugins/ and find the NextGEN folder. Rename this folder to deactivate the plugin and your website should be working normally again after this.
To update NextGEN manually you’ll have to download the latest release from www.nextgen-gallery.com, extract the zip package and upload the files through FTP to the /wp-content/plugins/ folder. Once the files are uploaded, log in to wp-admin and visit the “Plugins” menu, from here you can activate NextGEN Gallery and all should be fixed.
Please let us know in the comments if this was useful.
For more information on updating the NextGEN Gallery plugin visit:
http://www.nextgen-gallery.com/installing-and-updating-nextgen-gallery/