I just realized that a few websites of mine have been encountering this error, something I should have definitely caught early, but I’m not much of an Internet Explorer user past the obvious adjusting of CSS and a quick run through of every website I develop to make sure everything is working. I would receive this error only in Internet Explorer and when I didn’t fill out all of the required fields to post a comment on any post.
I just realized that a few websites of mine have been encountering this error, something I should have definitely caught early, but I’m not much of an Internet Explorer user past the adjusting of CSS and a quick run through of every website I develop to make sure everything is working. I would receive this error only in Internet Explorer and when I didn’t fill out all of the required fields to post a comment on any post. I had no clue where to start so I went for the file wp-comments-post.php since that’s where the error seemed to be coming from and realized that’s a really long file, then also realized there’s so many files in WordPress for me to start having to debug this could literally take days of debugging. I searched this error in Google and found many other people were having the same exact error. I tried multiple solutions with every practical fix I could find on the first page of Google results but only found one that fix the problem, it’s a quick fix, and we unfortunately have to change a line in WordPress that’s part of the core functionality but it was much better then receiving an error. The downside to this fix is that everytime WordPress is updated you’ll have to remember to go in and change it again. Annoying, yes, better then an ugly 500 Error until WordPress updates this? Definitely. What you need to do is locate the /wp-includes/functions.php file and scroll on down to about line 2792 where the line states:
$defaults = array( 'response' => 500 );
And change the 500 too 200. This will give another type of error, allowing WordPress to give a proper error telling the user that the right fields haven’t been filled out.
TAGS: