WordPress unresponsive script error
Careful! This post is looking a little old and could be inaccurate in many, many ways
Today I came across a rather unusual WordPress problem that either resulted in an ‘unresponsive script’ error or crashed my browser when attempting to write a new post.
When navigating through the WordPress admin to add a new post an ‘unresponsive script’ error appears allowing options to stop, debug or continue. None of these allow the page to continue loading correctly with the text formatting options still nowhere to be seen. Initially I considered the problem to be related to these options or an incompatible plugin.
In fact the error was caused by something much more random. The blog in question was a new development of an existing blog and as such had used the export/import options to migrate the posts from the old blog. When importing the posts from an XML file WordPress may add entries into the wp_postmeta database table with a post_id equal to 0. When trying to add a new post these entries cause a conflict and thus the error message appears.
The solution is to simply remove these entries from the database. With access to the database used by the blog, run the following SQL query to remove all the conflicting entries from the database. With all these entries gone everything should go back to normal.
DELETE FROM wp_postmeta WHERE post_id = 0
In my experience this problem only occurs in WordPress 2.5.1 although if the error occurs in different versions the same solution may fix the error.