Undefined _weak_escape(), Redirection, and the WordPress 2.8 Upgrade
If you upgraded to WordPress 2.8 and ended up with an error like this…
Fatal error: Call to undefined method WordPress_Module::_weak_escape() in ../wp-includes/wp-db.php
Chances are you have the Redirection plugin. Anything prior to version 2.1.14 will throw this error when you upgrade. Of course, it would have been nice if you upgraded the plugin prior to upgrading WordPress, but you didn’t do that… did you?
I didn’t either.
No worries. The solution is simple enough:
- Rename the /wp-content/plugins/redirection directory to /wp-content/plugins/redirection-bad (or something like that) – This will cause WordPress to disable the plugin.
- You should be able to log into the WP admin now.
- Go to Plugins in the WP admin and confirm that the Redirection plugin is disabled.
- Change the /wp-content/plugins/redirection-bad back to /wp-content/plugins/redirection.
- Refresh the Plugins page in the WP admin.
- You should be able to use the automatic upgrade now on the Redirection plugin.
If you have other blogs to upgrade, try upgrading the plugin first… unless you like this sort of thing.