Quantcast
Channel: WordPress.org Forums » [Yoast SEO - Advanced SEO with real-time guidance and built-in AI] Support
Viewing all articles
Browse latest Browse all 42467

Jayce53 on "[Plugin: WordPress SEO by Yoast] Wordpress SEO and Easy Recipe Plus conflict"

$
0
0

This is caused by a bug in the SEO plugin which will not only cause problems for EasyRecipe but potentially any other plugin (or theme) that uses output buffer manipulation.

It was reported over 4 months ago but the SEO plugin maintainers have done nothing about it. This is somewhat disappointing since the fix (as I wrote 4 months ago) is trivially simple (see below)

The symptoms for the current versions of EasyRecipe and WordPress SEO are slightly different from the previous versions, but the underlying bug is exactly the same.

Four months ago, the bug caused a problem with the EasyRecipe output. The symptoms with the current versions is that if SEO title rewrites are enabled and the "Fix broken microformatting" EasyRecipe setting is enabled, then you may end up with two title tags, only one of which will have been rewritten.

The fix is simple:

For the current WordPress SEO version (1.4.12) change the following in \wp-content\plugins\wordpress-seo\frontend\class-frontend.php

comment out line 102: // add_action( 'wp_footer', array( $this, 'flush_cache' ) );
change line 1175 to: function flush_cache($content) {
comment out line 1181:  // $content = ob_get_contents();
comment out line 1202: // ob_end_clean();
change line 1206 to: return $content;
change line 1215 to:  ob_start(array($this,'flush_cache'));

Technically, the SEO plugin rides roughshod over any other use of output buffer manipulation by using "ob_end_clean()" which trashes any existing output buffers. The fix hooks into the output buffer chain instead and titles can be rewritten without messing with any other plugin's use of output buffers.


Viewing all articles
Browse latest Browse all 42467

Trending Articles