Tuesday, July 12, 2011

Wordpress and AJAXed Wordpress

I run a blog for my photography business at http://www.terebinthtreeportraits.com/blog where I use an older version of the Tofurious theme on it because I like to be able to post large photos to it (running the blog in a big single column). Tofurious uses a plug-in called AJAXed WordPress, which provides all sorts of interesting effects and goodies to a WordPress blog.

Lately (well, since version 3.0 of WordPress actually), I noticed that when a comment would be posted, the person would receive a red "Error Received:" message. I would still get the notification that a comment was posted, but that's not a good thing for a visitor to see an error message. Especially one in RED.

Thank goodness for Google, as I found a work-around today at http://kimtown.com/design/2011/06/how-to-fix-your-ajaxed-for-wordpress-comment-error/

It entails a little bit of editing to remove (or comment out) a call to the exit statement in the wp-comments-post.php file.

Commented out "exit;" statement
So I loaded up the wp-comments-post.php file in UltraEdit (the best text editor I've ever used, BTW), and scrolled down to the bottom of the file where it had the "exit" statement and commented it out with a couple of forward slashes.

After doing this, the "Error Received" message went away, and all was well again with my WordPress blog.

However, there is a big gotcha with this approach.  Notice I said this in BOLD.  In big letters.  This could wind up being the showstopper for this approach.

Since this change is made directly to WordPress' underlying php code, it's highly likely to get overwritten in future updates.  So, until the AJAXed WordPress plugin gets updated, I'm going to have to monitor this file to see if WordPress fixes this little fix.

2 comments:

wishyouwerehere October 3, 2011 at 1:53 AM  

This is so far over my head that it is not funny...but, can't you edit the file in "editor"?

This kind of stuff scares the bejebers out of me.

John Solie October 3, 2011 at 9:17 AM  

Yeah, I know what you mean. My PHP-fu is not particularly strong. It never occurred to me to use the built-in WordPress editor. I suppose if it lets you tweak the file, that would be fine. I just like using an external editor that has many levels of "un-do" :-)

  © Free Blogger Templates 'Photoblog II' by Ourblogtemplates.com 2008

Back to TOP