#64204 closed defect (bug) (fixed)
Notes unexpected do not notify post author (unlike comments)
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.9 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Notes | Keywords: | has-patch |
| Focuses: | Cc: |
Description
Currently, WordPress sends email notifications to post authors when a comment is added to their post, but no equivalent notification is sent when a Note (block-level comment) is created.
As a result, post authors may miss important feedback added via the Notes feature. This issue aims to close that gap by sending a simple email notification to the post author whenever a new Note is added to their post, mirroring the existing comment notification flow.
Current Behavior
- New Notes are created and stored via REST API endpoints.
- No notification is triggered or sent to the post author.
Expected Behavior
When a new Note is created on a post:
- The post author should receive an email similar in structure to comment notifications.
- The email should include:
- The post title and permalink
- The user who added the Note
- A short snippet or summary of the Note content
- A link to open the post in the editor where the Note can be viewed
Proposed Solution
- Hook into the Note creation endpoint (e.g., via REST API callback or equivalent action).
- Trigger an email notification to the post author, using the same email template and structure as the existing comment notification (with modified subject line such as
New note added on your post). - Keep this limited to email only for now, deferring broader notification architecture to a later phase.
Change History (22)
#2
@
4 weeks ago
- Summary changed from Notes: Send email notifications to post author to Notes unexpected do not notify post author (unlike comments)
#3
@
4 weeks ago
It is not technically a bug, but rather a missing feature / enhancement from wordpress side
It is a bug at least in part. Technically, the bug is that comment/note submissions via the REST API do not trigger notifications which is unexpected. Comments saved via the ajax route do trigger notifications.
When we added the REST API comment route, I believe this was overlooked because we didn't use the comment route in core at the time. Now that we are - notes save via the REST comment route - the bug has become apparent.
That said, to add the notifications for notes requires updating the notification message which isn't exactly fixing a bug.
This ticket was mentioned in PR #10472 on WordPress/wordpress-develop by @adamsilverstein.
4 weeks ago
#4
- Keywords has-patch added
Send notifications when a new note is added to the the post author. Leverages existing comment notification infrastructure.
## Testing instructions
- Create a post
- Log in as a different user (notifications are only sent when a note is left by another user, not your own notes).
- Leave a comment on the post
- Check your email
### Expected result
An email looks like this for a note "Leaving some feedback here." on a post entitled "Admin post":
Subject: [blogname] Note: "Admin post" New note on your post "Admin post" Author: Test User 002 (IP address: ::1, localhost) Email: [email protected] Note: Leaving some feedback here. You can see all notes on this post here: https://wpdev.localhost/wp-admin/post.php?post=2167`
Trac ticket: https://core.trac.wordpress.org/ticket/64204
@adamsilverstein commented on PR #10472:
4 weeks ago
#5
I was thinking about how users could disable these notifications and realized we already have a setting to control comment notifications that will also effect notes (ironically under a settings section labeled "Discussion"):
We should probably change the first line there to:
I don't think the second toggle applies to notes since we don't hold notes for moderation. but we should double check the code logic to verify.
@annezazu commented on PR #10472:
4 weeks ago
#6
A future release could break out the checkbox to enable controlling Comment and Note notifications separately.
This doesn't make sense to me. Can we add an additional checkbox for Notes? Comments and Notes are very different experiences right in many ways. I can very easily see someone wanting to only be notified for one or the other, especially with how inundated we all are by notifications. For example, omeone who wants to be super responsive to anyone interacting with their blog but spends so much time already in the editor may only want to be notified of Comments without Notes.
@adamsilverstein commented on PR #10472:
4 weeks ago
#7
This doesn't make sense to me. Can we add an additional checkbox for Notes?
Sure, I'll work on it.
@desrosj commented on PR #10472:
4 weeks ago
#8
Maybe we can skip notifications when the note is empty?
I did this for now in f089d47 - I wonder if we should send a notification for "Thread resolved" or "Thread reopened" events.
Could you explain this @adamsilverstein? What is a scenario where a Note would be empty? Would that be when someone clicks Resolve and does not enter a comment? Technically the note is not empty, it's a status resolution.
I do have one concern around notifications being sent for every note or reply left on a post. If more than one person is interacting with notes, this could quickly get overwhelming from an email perspective causing email fatigue.
I believe in Google Docs, notifications are slightly delayed and batched into a single email. In that sense, I prefer the cron approach. Let's say there is a 5 minute delay.
- Every time a note or reply is left, check for the existence of the cron event.
- If it exists, push the event time out to 5 minutes from the current time to extend the delay slightly.
- If not, schedule a new event.
I recognize that this is probably unrealistic for 7.0, but I think that is what I envision.
Also, comments typically go to just the author. What about someone who creates a note? I don't think they will ever receive a notification that someone has replied to them.
@adamsilverstein commented on PR #10472:
4 weeks ago
#9
A future release could break out the checkbox to enable controlling Comment and Note notifications separately.
This doesn't make sense to me. Can we add an additional checkbox for Notes?
@adamsilverstein commented on PR #10472:
4 weeks ago
#10
Could you explain this @adamsilverstein? What is a scenario where a Note would be empty? Would that be when someone clicks Resolve and does not enter a comment? Technically the note is not empty, it's a status resolution.
Right - exactly. When a note is resolved, a comment is stored along with some comment meta, but the comment content is empty.
I do have one concern around notifications being sent for every note or reply left on a post. If more than one person is interacting with notes, this could quickly get overwhelming from an email perspective causing email fatigue.
Valid concern, however this is the same as the current comment notification behavior, wouldn't that also be true of comments?
I believe in Google Docs, notifications are slightly delayed and batched into a single email.
I would like to test that further to validate, sounds nice though. It should be possible to do that in core, do you think we should apply the same approach to comment notifications? For some busy sites, 5 min may be too long, but we could make this filterable.
Also, comments typically go to just the author. What about someone who creates a note? I don't think they will ever receive a notification that someone has replied to them.
Right, that we be a nice enhancement for 7.0, along with notifications when we add the "@" mention feature we have planned (notify users when they are mentioned)
@JeffPaul commented on PR #10472:
4 weeks ago
#11
@desrosj note that the additional notification handling you've described is something I have stashed as a draft GitHub issue for 7.0, I'll make sure to tag you once I get that opened (frankly Monday earliest as I'm currently still sitting on the tarmac for last hour with travels this week 🥴 )
@adamsilverstein commented on PR #10472:
4 weeks ago
#12
Could you explain this @adamsilverstein[[Image(chrome-extension://hgomfjikakokcbkjlfgodhklifiplmpg/images/wp-logo.png)]]? What is a scenario where a Note would be empty? Would that be when someone clicks Resolve and does not enter a comment? Technically the note is not empty, it's a status resolution.
Right - exactly. When a note is resolved, a comment is stored along with some comment meta, but the comment content is empty. You can also re-open a thread without leaving a comment (from the ... menu). Should we send a notification then that says "A Thread was resolved/reopened"?
I added this in https://github.com/WordPress/wordpress-develop/pull/10472/commits/887974e4afcd2a678e18728a2d58c48d6524e72f
@JeffPaul commented on PR #10472:
4 weeks ago
#13
In quick testing, the additional setting for Notes emails in the Settings > Discussions menu appears as expected. Unfortunately I'm having trouble with Mailpit so I'm unable to validate the emails are firing as expected and have the format as expected.
@wildworks commented on PR #10472:
4 weeks ago
#14
I confirmed that emails are only received when the ” Anyone posts a note” setting is enabled:
New note on your post "Hello world!" Author: editor (IP address: 172.18.0.1, 172.18.0.1) Email: [email protected] Note: This is a test note. You can see all notes on this post here: http://localhost:8889/wp-admin/post.php?post=1&action=edit
#15
@
4 weeks ago
Tested with below steps :
Create post as a author Login as a editor and add a note verify the post author receive email
Observe :
Email receive when anyone post a note setting is on Note : "Hello WordPress"
Important conclusion : When the setting is disable no email sent as expected
@ellatrix commented on PR #10472:
4 weeks ago
#16
How are we doing here? Code freeze for Beta 4 is in about an hour. Is this ready to go?
@adamsilverstein commented on PR #10472:
4 weeks ago
#17
How are we doing here? Code freeze for Beta 4 is in about an hour. Is this ready to go?
I was waiting for feedback, I think we could commit this now and refine the few pieces of feedback later.
This ticket was mentioned in PR #10488 on WordPress/wordpress-develop by @adamsilverstein.
4 weeks ago
#19
This PR address a few points of input that remained incomplete from https://github.com/WordPress/wordpress-develop/pull/10472/ before it was merged in order to make it into Beta 4.
Trac ticket: https://core.trac.wordpress.org/ticket/64204
It is not technically a bug, but rather a missing feature / enhancement from wordpress side