Environment
- ACF Pro: 6.7.1
- WordPress: 6.9.4
- PHP: 8.3
Description
A wysiwyg field inside a clone field (display: seamless, prefix_field: 0) does not
persist its value when the clone is placed on an ACF Options Page.
Steps to reproduce
- Create a shared field group with a
wysiwyg field (e.g. group_shared_title, field key field_shared_title, name title)
- Create an Options Page field group that clones it:
"type": "clone", "clone": ["group_shared_title"], "display": "seamless", "prefix_field": 0
- Enter text in the wysiwyg and save
Expected behavior
options_title in wp_options contains the saved value.
Actual behavior
options_title is empty. The reference row _options_title is written with the clone
field's key (field_global_cta_newsletter_title) instead of the inner wysiwyg field's
key (field_shared_title), so ACF cannot correctly resolve and persist the value.
POST payload (confirmed via DevTools)
The value IS sent correctly in the request:
acf[field_global_cta_newsletter_title][field_global_cta_newsletter_title_field_shared_title] = "
...
"
But after save, options_title remains empty.
Workaround
Manually intercept acf/save_post and write the value directly to wp_options:
add_action('acf/save_post', function ($post_id) {
if ($post_id !== 'options') return;
$acf = $_POST['acf'] ?? [];
$clone_key = 'field_global_cta_newsletter_title';
$inner_key = $clone_key . '_field_shared_title';
if (isset($acf[$clone_key][$inner_key])) {
update_option('options_title', wp_kses_post($acf[$clone_key][$inner_key]));
}
}, 20);
Environment
Description
A
wysiwygfield inside aclonefield (display: seamless, prefix_field: 0) does notpersist its value when the clone is placed on an ACF Options Page.
Steps to reproduce
wysiwygfield (e.g.group_shared_title, field keyfield_shared_title, nametitle)"type": "clone","clone": ["group_shared_title"],"display": "seamless","prefix_field": 0Expected behavior
options_titleinwp_optionscontains the saved value.Actual behavior
options_titleis empty. The reference row_options_titleis written with the clonefield's key (
field_global_cta_newsletter_title) instead of the inner wysiwyg field'skey (
field_shared_title), so ACF cannot correctly resolve and persist the value.POST payload (confirmed via DevTools)
The value IS sent correctly in the request:
acf[field_global_cta_newsletter_title][field_global_cta_newsletter_title_field_shared_title] = "
...
"But after save,
options_titleremains empty.Workaround
Manually intercept
acf/save_postand write the value directly towp_options:add_action('acf/save_post', function ($post_id) {
if ($post_id !== 'options') return;
$acf = $_POST['acf'] ?? [];
$clone_key = 'field_global_cta_newsletter_title';
$inner_key = $clone_key . '_field_shared_title';
if (isset($acf[$clone_key][$inner_key])) {
update_option('options_title', wp_kses_post($acf[$clone_key][$inner_key]));
}
}, 20);