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
When you create a flexible layout, duplicate it (using the built-in ACF quick action) and then keep the fields intact in the copy by just renaming them, they keep their internal key. Thats means they are being mistakenly skipped as duplicates by this retrieve_flexible_keys_from_fields() check in /classes/main.php:
if ( ! empty( $keys[ $layout_field['key'] ] ) ) {
and ignored, which means the preview for any but the most recent layouts is missing.
I have fixed it by combining the parent layout key (which does change upon duplication) with the field key so the key is really unique, like this:
When you create a flexible layout, duplicate it (using the built-in ACF quick action) and then keep the fields intact in the copy by just renaming them, they keep their internal key. Thats means they are being mistakenly skipped as duplicates by this
retrieve_flexible_keys_from_fields()
check in/classes/main.php
:if ( ! empty( $keys[ $layout_field['key'] ] ) ) {
and ignored, which means the preview for any but the most recent layouts is missing.
I have fixed it by combining the parent layout key (which does change upon duplication) with the field key so the key is really unique, like this:
Happy to provide you with an example or with a PR if you'd like.
The text was updated successfully, but these errors were encountered: