6.2.1 update breaks the use of shortcodes in block themes

Last night one of the sites I helped build auto-updated to 6.2.1. The homepage of the site is built using the new ‘full site editor’ and included a shortcode from an event listing plugin, and following the update the shortcode stopped rendering anything.

[https://wordpress.org/documentation/wordpress-version/version-6-2-1/](https://wordpress.org/documentation/wordpress-version/version-6-2-1/) notes simply say they fixed a vulnerability in “Block themes parsing shortcodes in user generated data”.

The fix was to go in and convert that shortcode into a “Template Part,” which seems to allow the shortcode to run as normal. Whether that will also be ‘fixed’ into a non-working state I’m not sure, but I figured I’d post the fix in case anyone in here ran into the same problem after the update.

4 Comments
  1. I posted a tweak to a plugin provided earlier in the thread that re-enabled the shortcodes via a plugin: [https://core.trac.wordpress.org/ticket/58333#comment:72](https://core.trac.wordpress.org/ticket/58333#comment:72)

    The root of the issue is that the way shortcodes were being processed in Block Themes specifically would have allowed user generated content (comments, etc) to process shortcodes as well. So they had to disable it, but talk is currently going on as to how to enable shortcode parsing selectively. On an ‘as needed’ basis and not by default, or at just the template level exclusive of the user generated content.

  2. Just stop using blocks and switch back to the version of WordPress that works with an actually good page builder.

  3. This made for an entertaining night of frenzied Googling.

    And wondering how easy it would be to convert the affected plugins to use blocks.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer