Reply To: plug in errors. please help!

#2742
Ernest Marcinko
Ernest Marcinko
Keymaster

Hi!

That url is currently working for me. This is very strange. How is it possible, that sometimes it’s working, sometimes it’s not. I mean, the related posts plugin outputs the same exact html for the same post – so I don’t understand how can it get corrupted.

Anyways I did a googling on this thing, and if I’m correct then you are using the WP Fastest cache plugin. I’ve found a support thread with a problem very similar to yours with a different plugin: https://wordpress.org/support/topic/html-is-corrupted?replies=6

I’ve downloaded the plugin and examined the code, and my best guess is that the html checking function is failing or it’s buggy in some cases – that would explain why a page on your site is working sometimes, then it fails on other times. Anyways, in my opinion the best thing to do is to bypass that function with a minor modification on their code. Since they are aware of this issue I think they will solve it sometime soon.

Open up the wp-content/plugins/wp-fastest-cache/inc/cache.php file and go to line 137, where you should see this function:

public function checkHtml($buffer){
	if(preg_match('/<\/html>/si', $buffer) && preg_match('/<\/body>/si', $buffer)){
		return false;
	}

	return true;
}

replace it with the following:

public function checkHtml($buffer){
  return false;
}

This will bypass the html check for now, until they fix the regular expressions in this function. After this change, clear the cache and the pages should start showing up correctly.

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)