AdvancedCustomFields / AdvancedCustomFields/acf
WYSIWYG field turns blank inside block after changing position in columns
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Spotted a strange bug with the WYSIWYG field. The field gets cleared if it is used inside a block that is inside a column if you move the block's position below another block in the same column. Switching from edit mode to view mode and back makes the text reappear. Also this bug only seems to occur when moving the block below another block. When moving the block above another block, the text remains visible.. It's easier to explain with a video:

Steps to reproduce the bug
- Create Gutenberg block
add_action('acf/init', 'my_acf_blocks_init');
function my_acf_blocks_init() {
// Check function exists.
if( function_exists('acf_register_block_type') ) {
// Register a testimonial block.
acf_register_block_type(array(
'name' => 'testimonial',
'title' => __('Testimonial'),
'description' => __('A custom testimonial block.'),
'category' => 'formatting',
'mode' => 'edit',
));
}
}
- Create an ACF group with a WYSIWYG field, and assign it to the block. (Import this ACF JSON code)
[
{
"key": "group_5ff085f624e26",
"title": "test",
"fields": [
{
"key": "field_5ff085fce7156",
"label": "wysiwyg",
"name": "wysiwyg",
"type": "wysiwyg",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"tabs": "all",
"toolbar": "full",
"media_upload": 1,
"delay": 0
}
],
"location": [
[
{
"param": "block",
"operator": "==",
"value": "acf\/testimonial"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": "",
"active": true,
"description": ""
}
]
- Create a post or a page
- Create 2 columns
- Add the testimonial block containing the WYSIWYG field to the page
- Create another block inside the same column.
- Change the position of the blocks. Notice that the moment the WYSIWYG block gets move below another element inside the column, the output is cleared.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using the supplied ACF testimonial block, WYSIWYG field, two-column layout, and block-reordering steps, then inspect the Gutenberg block and WYSIWYG behavior involved. Done means the field content remains visible when the block is moved below another block in the same column, without needing to switch modes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100