If you switch away from a block before the ACF fields have loaded in the sidebar, the data attribute is not saved in the serialized post content, and leaves the block in a permanently bad state.
Steps to reproduce:
Add a 1st block to your page
Add a 2nd block to your page
Before the 2nd block's ACF fields in the sidebar load, click on your 1st block to bring focus to the 1st one
note the absence of a "data" : { } which should have something as I have some default ACF field values. I can change the block field values in the visual mode, but the changes I make don't get reflected on the frontend because "data" is never populated nor updated.
If I go into the code editor, add "data" : {} to the array, save the page, and reload then I can start using the block again fine and it saves my changes.
This can also be reproduced another way which makes the bug a bit less edge case and more important:
Set your block to default into Visual mode
Enter full screen mode and no sidebar at all
Add a block to your page
Save your page
View your page on the frontend
The block will not show up because the data attribute is not populated again.
If you switch away from a block before the ACF fields have loaded in the sidebar, the data attribute is not saved in the serialized post content, and leaves the block in a permanently bad state.
Steps to reproduce:
The data for the 2nd block is saved like
note the absence of a "data" : { } which should have something as I have some default ACF field values. I can change the block field values in the visual mode, but the changes I make don't get reflected on the frontend because "data" is never populated nor updated.
If I go into the code editor, add "data" : {} to the array, save the page, and reload then I can start using the block again fine and it saves my changes.
This can also be reproduced another way which makes the bug a bit less edge case and more important:
The block will not show up because the data attribute is not populated again.