You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The oik_shortcodes post type will add a [bw_code] shortcode to the content
if no shortcodes are present. This shortcode is then run and further functionality invoked to display Examples, Snippets etc.
Sometimes this works.
Other times we get recursion, leading to an un-captured Fatal error and an Aw, snap message from Chrome.
Problem explanation
When WordPress SEO is trying to display OpenGraph tags in the header it attempts to obtain the meta description for the post. If this is not available it builds one from the excerpt. If that is not available WordPress creates an excerpt which invokes the_content.
Not knowing any better all the plugins that hook into the_content do their thing and then the excerpt gets produced.
Problems can occur if nested shortcode expansion is performed and 'the_content' filtering goes recursive.
Even if it doesn't go wrong, you'll notice that up to twice as much work is being done than is actually required.
Workaround
Either define a Meta Description in the WordPress SEO meta box.
or deactivate WordPress SEO.
Solution
Add oik_get_the_excerpt() to prevent recursion in 'the_content' processing.
Change the 'the_content' filter logic so that content is only 'enhanced' once.
The text was updated successfully, but these errors were encountered:
bobbingwide
changed the title
Problems displayed oik_shortcodes when WordPress SEO is activated
Problems displaying oik_shortcodes when WordPress SEO is activated
Sep 8, 2015
Add oik_get_the_excerpt() to prevent recursion in 'the_content' processing.
This solution should work post types created in oik-plugins and oik-themes as well.
The question asked in oik issue 115 was “does this fix this problem?”. The answer is that it’s a lot better now. There are still problems with the [bw_code] shortcode being expanded in the block editor, but these are addressed elsewhere. See #58.
Problem description
The oik_shortcodes post type will add a [bw_code] shortcode to the content
if no shortcodes are present. This shortcode is then run and further functionality invoked to display Examples, Snippets etc.
Sometimes this works.
Other times we get recursion, leading to an un-captured Fatal error and an Aw, snap message from Chrome.
Problem explanation
When WordPress SEO is trying to display OpenGraph tags in the header it attempts to obtain the meta description for the post. If this is not available it builds one from the excerpt. If that is not available WordPress creates an excerpt which invokes the_content.
Not knowing any better all the plugins that hook into the_content do their thing and then the excerpt gets produced.
Problems can occur if nested shortcode expansion is performed and 'the_content' filtering goes recursive.
Even if it doesn't go wrong, you'll notice that up to twice as much work is being done than is actually required.
Workaround
Either define a Meta Description in the WordPress SEO meta box.
or deactivate WordPress SEO.
Solution
Add oik_get_the_excerpt() to prevent recursion in 'the_content' processing.
Change the 'the_content' filter logic so that content is only 'enhanced' once.
The text was updated successfully, but these errors were encountered: