Adding Post Comments Form block to post causes validation error for comment-reply
enqueued script
#6231
Labels
Bug
Something isn't working
Changelogged
Whether the issue/PR has been added to release notes.
Integration: Gutenberg
Milestone
Bug Description
As part of Full Site Editing, Gutenberg has a “Post Comments Form” block:
This renders the standard comments form inside the post content:
When viewing such a post on the frontend, a validation error is reported:
Normally the
comment-reply
form is dequeued when thesingular
template is loaded:amp-wp/includes/class-amp-theme-support.php
Lines 901 to 906 in 1c7728c
This doesn't work for the block, however, because the script is enqueued as part of the render callback.
This is the second block we've seen in core to enqueue a script, the first being the File block which we added support for in #6112. We may need to take a similar approach where we dequeue the script just-in-time at
wp_print_scripts
/wp_print_footer_scripts
. For example:Note also that the source of this script is erroneously being reported as Twenty Twenty-One when it should be Core.
Expected Behaviour
Steps to reproduce
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: