Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Ran into this when installing Comment Notify on an existing site and reproduced it on a fresh D8 install. I installed Comment Notify and allowed users to choose whether to subscribe to "All Comments" or "Replies to my comment." I then made a test comment, choosing "Replies to my comment" and replied to it via a different user account. No email was sent.
Proposed resolution
The issue seems to be that the thread is returned without the trailing '/', i.e. "05" instead of "05/". Using rtrim to remove the trailing slash only if present, as in Comment::preSave(), fixed the issue for me.
Comment | File | Size | Author |
---|---|---|---|
#6 | 2879914-6.patch | 14.56 KB | gnuget |
| |||
#6 | 2879914-6-test-only.patch | 13.59 KB | gnuget |
#2 | not_recognizing_replies-2879914-2.patch | 993 bytes | kmonahan |
|
Comments
Comment #2
kmonahan CreditAttribution: kmonahan commentedPatch to trim the $alert->getThread() with rtrim().
Comment #3
kmonahan CreditAttribution: kmonahan commentedComment #4
toamit CreditAttribution: toamit commentedTested, this seems to work. thanks for sharing the patch.
Comment #5
wturrell CreditAttribution: wturrell as a volunteer commentedPatch also working for me in 8.6.1.
Comment #6
gnugetI wrote a test for this (actually I refactored a bit the tests).
Patch attached.
Comment #8
gnugetAnd I just pump this to critical, the notification is not working without this patch.
Comment #10
gregglesThanks for the work on this and especially for the tests.