14 Feb 22

ACF PRO 5.12 Beta 2

By Liam Gladdy

We’ve released a second beta of ACF PRO 5.12 with the following fixes and changes from Beta 1

To access this release, please login to your account, navigate to the “Licenses” page and select version “5.12-beta2” from the available downloads.

Editing ACF Block Data in the Site Editor

WordPress 5.9’s Site Editor view uses an iframe for rendering the blocks inside a page template. This isolates the content from the rest of WordPress to separate the blocks from the rest of the styles loaded globally, but also means ACF can’t easily access it’s JavaScript code for fields powered by select2, or jquery-ui libraries like date and color pickers.

Unfortunately, until we or the Gutenberg team can develop a solution to make these third party libraries work correctly inside the Site Editor, you’ll need to use the sidebar to modify any block specific fields in ACF Blocks in the Site Editor. This matches the behavior of using a block inside a query loop block.

Block Loading Cache

Each time an ACF block is rendered in the block editor, an AJAX call is required to load your template. With the introduction of block patterns which can contain ACF Blocks and other features that show previews in the block editor, this leads to a significant amount of loading.

Whilst we can’t prevent that initial load, in the case of block patterns often the same block is loaded many times. To solve this, we’ve implemented a local cache of these AJAX call results, which means we only need to make that call once, no matter how many times it’s displayed.

This should result in significantly less AJAX calls and improved performance, especially when using features like block styles or ACF blocks inside block patterns.

You may notice some debugging console.log deliberately left in this beta to support us debugging any issues you find with this system. These will be removed for the final release.

Full Changelog (since Beta 1)

  • New – Added block caching system to reduce the number of AJAX calls in the block editor
  • New – ACF blocks in the new Site Editor are now forced into “preview” mode for better compatibility
  • Fix – Fixed an issue where block $context was not available in preloaded blocks or frontend rendering in 5.12-beta1
  • Fix – Fixed an issue where anchors weren’t working correctly in WordPress 5.9
  • Fix – Fixed an issue where the “unfiltered_html” capability wasn’t being used by ACF blocks
Supercharge Your Website With Premium Features Using ACF PRO

Speed up your workflow and unlock features to better develop websites using ACF Blocks and Options Pages, with the Flexible Content, Repeater, Clone, Gallery Fields & More.

Explore Features View Pricing

PRO Features
ACF Blocks
Options Pages
PRO Fields
Repeater
Flexible Content
Gallery
Clone

About the Author