-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Copy link
Labels
Collaborative WorkflowsPhase 3 of the Gutenberg roadmap around all-things related to collaborative workflowsPhase 3 of the Gutenberg roadmap around all-things related to collaborative workflows[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
The filter exclude_block_comments_from_admin
on the pre_get_comments
hook affects the queries for subsequent calls to get_comments()
etc.
This occurs because a filter is added to comments_clauses
to modify the clause without relation to the comments being queried.
Step-by-step reproduction instructions
- Create and publish a post
- Write two block comments on the post via editor
- Write two actual comments on the post via the front end
- Approve the front end comments if required by your moderation settings
- Run the following commands in wp-cli to view the error, the second call is expected to show the block comments
wp> get_comments( ['post_id' => 89, 'fields' => 'ids'] );
=> array(2) {
[0] =>
int(8)
[1] =>
int(7)
}
wp> get_comments( ['post_id' => 89, 'fields' => 'ids', 'type' => 'block_comment'] );
=> array(0) {
}
Screenshots, screen recording, code snippet
No response
Environment info
- Gutenberg trunk @ c8b5138
- WP 6.8.3-alpha-60773
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure
Metadata
Metadata
Assignees
Labels
Collaborative WorkflowsPhase 3 of the Gutenberg roadmap around all-things related to collaborative workflowsPhase 3 of the Gutenberg roadmap around all-things related to collaborative workflows[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Projects
Status
Done
Status
✅ Done