15 Jun

ACF PRO 5.9 Beta2

By Elliot Condon

ACF PRO 5.9 Beta2 is now available for download 🌈☀️! This includes all the highly anticipated updates shown in our ACF 5.9 – Exciting new features announcement.

To access this release, please login to your store account and select this version from the available downloads shown on the Licenses page. Users who already have a beta version installed will find an automatic update available via the Plugins admin page.

👨‍💻 Please find the release notes below. And for the latest ACF news, follow us on Twitter @wp_acf.

Fixed various issues when the Gutenberg plugin is active

A discrepancy between WP core and the Gutenberg plugin was discovered affecting the $is_preview parameter within a block type’s render callback/template. This issue prevented blocks from knowing the rendering context which then affected the ability to display InnerBlocks content. This bug has been fixed, allowing developers testing out the latest Gutenberg features to also test out ours!

Fixed bug with encoded JSON attribute values

As part of our support for the <InnerBlocks /> component, we added the ability to customize its “allowedBlocks” and “template” properties. Unfortunately, as some of you discovered, the logic we added to parse encoded JSON strings into real JavaScript arrays was a tad greedy and prevented the use of encoded JSON strings in any other element attribute. This bug is now fixed, allowing “data-x” attributes to contain encoded JSON strings.

Added JSX support for inline script tags

Under normal circumstances there isn’t any reason to include inline script tags within JSX, which is why React does not support it. Due to our unique position allowing JSX to be defined via a server-side technology, we’ve added in a layer of support for inline script tags.

Fixed bug breaking the block “post_types” setting.

A bug was reported, and subsequently squashed, causing the “post_types” setting found in acf_register_block_type() to go unnoticed by our API. This setting is now working as intended.

Fixed bug not updating preview when when changing modes

The previous 5.9-beta1 release unfortunately included a bug causing changes made in “auto” and “edit” modes to go unnoticed by our preview listener. This meant that when switching back to “preview” mode, no AJAX request was made to update the block preview. This bug is now fixed, and all modes will now work as intended.

Fixed bug breaking the Menu location rule.

A minor bug during the refactoring of the Menu location rule caused the “Menu Locations” values fail to match correctly when editing a Menu. This bug has been fixed, and all Menu location values are confirmed working.

Improved enqueueing of media assets

In an attempt to tackle two separate issues, we have made some improvements to our ACF_Assets class which is responsible for enqueuing all the scripts and styles needed for ACF to function. These improvements fix a bug where the Gallery field was unable to save (in a specific situation) within a block, and also a bug where an empty attachment item is displayed within the Media modal.

Fixed bug when duplicating field group

A issue with conditional logic rules was brought to our attention when duplicating a Field Group. This issue caused grand-children (sub sub fields) to incorrectly change their conditions to the newly duplicated children. This bug is now fixed.

Fixed bug when a duplicating row or layout

Various bugs have been reported in relation to the new Row and Layout duplication features. This beta2 release includes a fix for some (but not all) fields including Color, Tab, Date, DateTime and Time. These fields were reported to become “unresponsive” after duplication, and a fix has been applied.

We suspect there are more fields susceptible to the same issue, and will review all field types in beta3.

Added new JS actions

As a result from the above fix, we have added new JS actions for “duplicate_fields” and “duplicate_field”, which are triggered during when duplicating a Row or Layout.

Merged latest changes from the 5.8.12 release.

This release also merges in the most recent stable version of ACF which at this time is 5.8.12. This release contains a handful of useful improvements which we are happy to now have in 5.9.0-beta2.

 

🙌 Thanks to everyone who helped make this release possible. Think you’ve found a bug? Please post in detail a new support ticket.

About the Author