Mar 28, 2008
Tip and Trick Editorial

PHP Fatal Error on Call to Add_Query_Var in Taxonomy.php After Upgrading to WordPress 2.5 RC2

After upgrading to WordPress 2.5 RC2, some WordPress iinstallation will return completely blank web page or all blog posts, pages and even wp-admin administrator dashboard and other administrative panel. Or the following error will be displayed (the error message will also be logged and captured in Apache error_log).

PHP Fatal error: Call to a member function add_query_var() on a non-object in /home/domain/public_html/wp-includes/taxonomy.php on line 165

The error happens because the webmaster upgrades to WordPress 2.5 RC2 without deactivating the plugins activated beforehand, and apparently there is plug-in that conflict or not compatible with the new beta release of WordPress 2.5. The problem happens even though users are upgrading from WordPress 2.5 RC1, and has no problem on that version.

The unsupported plugin is related to tags. For example, Simple Tags and bSuite, no longer works in WordPress 2.5 RC2, and probably in final 2.5 version too.

The best way to avoid the error is to disable all plugins before upgrading, and then turn on the plugins one by one to ensure compatibility, and deactivate those causing the blank or error webpages.

However, if you already upgraded and forgot to deactivate the plugins, and now facing the the problem usable to access Plugin Management page anymore to disable tags related plugins, try the following workarounds to fix the issue.

  1. Login to the server, and delete the possible incompatible plugin away.
  2. Downgrade to WordPress 2.5 RC1 (download link) to disable all plugins, and then upgrade to WordPress 2.5 RC2, or final version when released, again.

Pin It on Pinterest

Share This

Share This

Share this post with your friends!