Brent at Relentlus unintentionally tipped me off to a solution for fixing what I had long thought was an AJAX problem in Wordpress. I was doing some comment PR for Pepperjam on Shoemoney’s new post about the breaking news of Pepperjam’s partnership with Doubleclick. And Brent was curious enough to check out my blog and attempted to leave a comment, only to find out that it doesn’t work.
Apparently the commenting feature on my blog has been broken for several months… I never thought twice about it, that in the lifetime of this blog I’ve only received two comments, one of them being my own. Haha.
The Problem
AJAX seemed to be screwed up in the Wordpress admin interface. I would delete a category and it would remove itself from the screen, but upon refreshing it would still be there. The same situation applied for adding new categories and blogroll entries. I thought that somewhere along the way of numerous Wordpress upgrades, my database table for user permissions became corrupted.
I tried re-uploading the default Wordpress files 5 times, which obviously wasn’t necessary to repeat so many times. And, as you might expect, it didn’t fix anything.
Also, I scavenged the Wordpress Support Forums for any possible solution. And that endeavor did not yield any positive results either. At one point I started to blame Dreamhost for my problems. Your servers suck, that’s why my Wordpress AJAX doesn’t work!
- WP Support Topic: Wordpress 2.1.1 Category Add Ajax Not Working
- WP Support Topic: no new comments, categories. no delete posts
- WP Support Topic: Can no longer delete/add categories (after 2.1.2 ?)
The Solution
The fix is simple and completely overlooked. I had 301-redirected my domain (for the purpose of SEO) so that all requests for http://itmilk.com would go to http://www.itmilk.com. However, in my Wordpress options, I had my URL setup as http://itmilk.com. So the admin AJAX functions could not properly access the URL’s stored in the script variables. So all I had to do was pop in a “www” into the URL option and everything, including the comment-posting, works now.
Thanks, Brent, I owe you a beer. Too bad that I’m under-age.
The Buzz {1 trackbacks/pingbacks}
The Conversation {11 comments}
test
That explains why I’ve never been able to comment here.
Cool, glad to see you got it fix. Corona w/ 2 limes is my preference!
This fix saved me! Thanks!
You are smart, thanks for the fix!
WOW! Thanks so much! You have no idea how much this was bothering me. Mine was adding categories and deleteing them. I searched Wordpress like you did and nothing they suggested helped.
Your awesome! ^_^ Thanks again!
Amazing, and yet so simple. Cheers mate.
I thought I was going mad! Thanks so much for your help! Fixed in 2 seconds!
thank you so much. you saved me from insanity. hahaha!
Cheers dude.
Can’t tell you how much this has made my life easier. Thanks mate.
Leave Your Own Comment
You can follow any responses to this entry via its RSS comments feed. You can also leave a trackback if the inclination is there.