This is the console error message: NotFoundError: Failed to execute ‘removeChild’ on ‘Node’: The node to be removed is not a child of this node.
Does this error continue after saving/refreshing the post you are editing?
No, the error doesn’t continue after saving/refreshing the post.
Well, I am able to reproduce the error you are seeing. I also see the error if you switch back and forth from preview to editing the block a couple times without duplicating the block.
I don’t have any answers unfortunately and I’m not actually sure if the fix for this would be within my plugin, in WordPress, or in ACF. Using my field within a block isn’t actually something I ever added to this plugin. It is something that ACF made available to all field types and required no changes on my end. So my thinking is this bug probably needs to be fixed within ACF, but I am not certain.
If I figure anything more out about it I’ll share here. Or release an update if it is something I can fix on my end.
Thank you for reviewing this issue so quickly!
I submitted a support ticket with ACF and referenced this thread. Hopefully, it’s something they can fix.
I reached out to ACF, but they weren’t able to resolve it. Here was their final response:
Based on our latest review and the simplified block code you’ve shared, the error appears to emanate from ACF Font Awesome rather than from ACF itself or the core WordPress block editor. The console error (NotFoundError: Failed to execute 'removeChild' on 'Node') suggests a JavaScript-related issue, likely triggered during the rendering or update cycle of the Font Awesome field in the editor view.
Since the error persists even with minimal PHP in the block template and seems tied to the presence of the Font Awesome field, we recommend reaching out to the ACF Font Awesome plugin maintainers directly to investigate how the field is handled in the block editor context.