Opened 6 weeks ago
Closed 3 weeks ago
#64474 closed defect (bug) (fixed)
Comments: Notes are accessible when query has comment_type=all
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.9.1 | Priority: | normal |
| Severity: | normal | Version: | 6.9 |
| Component: | Notes | Keywords: | has-patch has-unit-tests has-screenshots fixed-major dev-reviewed |
| Focuses: | Cc: |
Description
Related: #64198
In the comment list table, notes should not be displayed under any circumstances. However, I discovered that notes are displayed unintentionally when the value of the comment_type argument is all.
Steps to reproduce
- Create a post.
- Insert a block and add a note to the block.
- Access
http://localhost:8889/wp-admin/edit-comments.php?comment_type=all.
Change History (31)
This ticket was mentioned in PR #10679 on WordPress/wordpress-develop by @wildworks.
6 weeks ago
#1
- Keywords has-patch has-unit-tests added
#3
@
6 weeks ago
Reproduction Report
Description
This report validates whether the issue can be reproduced.
Environment
- WordPress: 7.0-alpha-61215-src
- PHP: 8.2.29
- Server: nginx/1.29.2
- Database: mysqli (Server: 8.4.6 / Client: mysqlnd 8.2.29)
- Browser: Chrome 142.0.0.0
- OS: Linux
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Gutenberg 21.7.0
- Test Reports 1.2.0
Actual Results
- ❎ Error condition DID NOT occur. Followed the steps to reproduce on the description but couldn't see it happening on latest trunk.
Additional Notes
- Created a new post and added paragraph blocks
- Added a note/comment on the paragraph block as per https://wordpress.com/support/wordpress-editor/add-notes-to-blocks/ - it's now labelled as comment as of this writing.
- Opened http://localhost:8889/wp-admin/edit-comments.php?comment_status=all as instructed but the exact comment/notes on the paragraph block did not appear.
Supplemental Artifacts
#5
follow-up:
↓ 6
@
6 weeks ago
❎ Error condition DID NOT occur. Followed the steps to reproduce on the description but couldn't see it happening on latest trunk.
@rollybueno Thanks for the testing, but the URL doesn't seem to be correct. The query argument is comment_type=all, not comment_status=all.
#6
in reply to:
↑ 5
@
6 weeks ago
Replying to wildworks:
❎ Error condition DID NOT occur. Followed the steps to reproduce on the description but couldn't see it happening on latest trunk.
@rollybueno Thanks for the testing, but the URL doesn't seem to be correct. The query argument is
comment_type=all, notcomment_status=all.
Thanks @wildworks - I just checked http://localhost:8889/wp-admin/edit-comments.php?comment_type=all but same result. I'll wait on other tester to see if they are able to reproduce this..
#7
follow-up:
↓ 8
@
6 weeks ago
@rollybueno ~What environment are you testing in? From your screenshots, the sidebar UI looks outdated.~
- Plugins:
- Gutenberg 21.7.0
- Test Reports 1.2.0
I found the cause. You're using a slightly outdated Gutenberg plugin. When testing core patches, please don't use the Gutenberg plugin.
#8
in reply to:
↑ 7
@
6 weeks ago
Replying to wildworks:
@rollybueno What environment are you testing in? From your screenshots, the sidebar UI looks outdated.
@wildworks - I'm using wordpress-develop with latest trunk pull. Just found out that Gutenberg version on my end interferes with this.
After deactivating it, this is how it looks now:

So yea, the private comments/notes intended for blocks are visible when visiting http://localhost:8889/wp-admin/edit-comments.php?comment_type=all
#10
in reply to:
↑ 9
@
6 weeks ago
Replying to rollybueno:
Visible even with
comment_status=alltoo bdw
Do you mean that you checked out the trunk branch, added a comment to a block, and then accessed the URL below?
http://localhost:8889/wp-admin/edit-comments.php?comment_status=all
Does this mean that when you access this URL, the notes are visible? I can't reproduce this in my environment.
#11
follow-up:
↓ 12
@
6 weeks ago
I'm on 7.0-alpha-61427
on wp-admin/edit-comments.php there are comments only,
on wp-admin/edit-comments.php?comment_type=all there are all comments (comments and notes).
on /wp-admin/edit-comments.php?comment_status=all there are comments only.
whether Gutenberg Plugin (v. 22.3.0) is active or not does not make any difference.
#13
@
6 weeks ago
Confirmed on latest trunk.
Block notes appear only with comment_type=all
Tested the patch it fix the issue.
#14
@
6 weeks ago
Reproduction Report
Description
This report validates whether the issue can be reproduced.
Environment
- WordPress: 6.9
- PHP: 8.3.23
- Server: Apache/2.4.43 (Unix)
- Database: mysqli (Server: 8.0.35 / Client: mysqlnd 8.3.23)
- Browser: Firefox 146.0
- OS: Ubuntu
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.1
Actual Results
- ✅ Error condition occurs (reproduced).
- Notes are present when user access:
wp-admin/edit-comments.php?comment_type=all
Additional Notes
- None
Supplemental Artifacts
#15
@
6 weeks ago
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/10679
Environment
- WordPress: 6.9
- PHP: 8.3.23
- Server: Apache/2.4.43 (Unix)
- Database: mysqli (Server: 8.0.35 / Client: mysqlnd 8.3.23)
- Browser: Firefox 146.0
- OS: Ubuntu
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.1
Actual Results
- ✅ Issue resolved with patch.
- Notes are no longer present in the comment list while accessing:
wp-admin/edit-comments.php?comment_type=all
Additional Notes
- None
Supplemental Artifacts
Before:
After:
@wildworks commented on PR #10679:
6 weeks ago
#16
@adamsilverstein @desrosj, What do you think about this approach of adding 'type__not_in' => 'note' to the query to make sure the notes never appear in the comments table? When using the WP_Comment_Query class, it is correct behaviour that `note` comment types will be included when `type=all` is requested. However, on the comment table, the note comment type should always be excluded.
@adamsilverstein commented on PR #10679:
6 weeks ago
#17
@adamsilverstein[[Image(chrome-extension://hgomfjikakokcbkjlfgodhklifiplmpg/images/wp-logo.png)]] @desrosj[[Image(chrome-extension://hgomfjikakokcbkjlfgodhklifiplmpg/images/wp-logo.png)]], What do you think about this approach of adding
'type__not_in' => 'note'to the query to make sure the notes never appear in the comments table? When using theWP_Comment_Queryclass, it is correct behaviour that `note` comment types will be included when `type=all` is requested. However, on the comment table, thenotecomment type should always be excluded.
Honestly, I'm not sure why we wouldn't allow notes on the comment table. The intent of comment_type=all would seem to be to include notes and any other custom comment type (conceptually, notes still feel like a type of comment for me). Still, developers can filter this out if they choose. All this points to our need to improve comments and comment types overall.
Questions:
- what happens if you use
comment_type=note? - how did you find this bug - do we actually link to the
comment_type=allurl in core or did you manually enter that?
@wildworks commented on PR #10679:
6 weeks ago
#18
what happens if you use
comment_type=note?
The parameter is ignored, so the note is not displayed. That's intentional by #10462.
how did you find this bug - do we actually link to the
comment_type=allurl in core or did you manually enter that?
I manually entered the URL, and I don't think comment_type=all is linked from anywhere.
#19
@
5 weeks ago
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/10679
Environment
- WordPress: 7.0-alpha-61215-src
- PHP: 8.2.29
- Server: nginx/1.29.4
- Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
- Browser: Chrome 143.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.1
Actual Results
- ✅ Issue resolved with patch.
Supplemental Artifacts
| Before | After |
|---|---|
|
|
@adamsilverstein commented on PR #10679:
5 weeks ago
#20
I manually entered the URL, and I don't think comment_type=all is linked from anywhere.
Given https://github.com/WordPress/wordpress-develop/pull/10462 and the decision to NOT show notes on the comments table, I'm fine making the change proposed in this PR. That said, I'm guessing there will be some need for note management, but perhaps that will remain plugin territory for now.
@wildworks commented on PR #10679:
5 weeks ago
#21
Thanks everyone for your reviews. For now, let's commit this PR and backport it to 6.9.1. We can consider how notes should be displayed in the comments table in a follow-up.
There is also an issue about displaying notes in the post list table: https://github.com/WordPress/gutenberg/issues/71622
@wildworks commented on PR #10679:
5 weeks ago
#23
it would be helpful to add a test case that also includes a custom comment type to ensure that
comment_type=alldoes display that and continues to ignore the note
Nice idea, updated the test in 5941650cfbc674e7373e6a843cbb78addbfd53c1
This ticket was mentioned in Slack in #core by jorbin. View the logs.
4 weeks ago
@wildworks commented on PR #10679:
3 weeks ago
#25
I think all the feedback has been addressed, so I’d like to commit this patch.
#28
@
3 weeks ago
- Keywords dev-feedback added
- Resolution fixed deleted
- Status changed from closed to reopened






Trac ticket: https://core.trac.wordpress.org/ticket/64474