-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post Comments Form: Allow to add it to the Site Editor #40108
Post Comments Form: Allow to add it to the Site Editor #40108
Conversation
Size Change: +20 B (0%) Total Size: 1.22 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! 👍
By the way, I think this is fixing #37182
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me as well 🙂 Just to confirm, the placeholder is just a paragraph saying "Post Comments Form" right?
Yes. Similar to Post Content, Post Author, etc. |
Nice catch! |
What?
Fixes #37182.
Allow Post Comments Form to be added in FSE (Editor)
Why?
If we land the Comments Query blocks, we should have the form to add comments included in the same template.

Right now, when you add the block in the site editor you get this message:
This happens because of this check, which shows the same error message if the comments are disabled on a
post
orpage
:When we are in the site editor, both
postType
andpostId
variables areundefined
so this check will show us both errors.The frontend instead is loading the form in a correct way.
How?
By including the possibility of being inside the editor (
postType
orpostId
variables areundefined
).In that case, we show the default
post comments form
placeholder.Testing Instructions
Before the PR:
After the PR: