Fix “500 Server Error” and Missing Comments in WordPress 4.0

November 12, 2014

in Development

Have you recently updated your WordPress installation to version 4.0 and noticed some stuff broke? Some pages are returning 500 errors and maybe your comments aren’t working? Not to worry! This is a (now) known issues with those using WordPress 4.0 and Thesis 1.8.5. If you’re using an earlier version of the framework, you’ll need to update to 1.8.5 for this to work.

To fix these errors, all you need to do is make a small edit to the comments.php file located in the Thesis files inside the WordPress them folder:

/wp-content/themes/thesis_185/lib/classes/

Find line 187 and instead of

	// Get our comments.
	$wp_query->comments_by_type = &separate_comments($wp_query->comments);
	$_comments = &$wp_query->comments_by_type['comment'];

change it to:

	// Get our comments.
	$wp_query->comments_by_type = separate_comments($wp_query->comments);
	$_comments = $wp_query->comments_by_type['comment'];

Save it and away you go! All you’re doing is removing the ampersand (&) symbols which conflict with the latest WordPress version. All should now be sweet 🙂

{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: