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.
If an anonymous user responds to a comment, he will not receive any message after sending. The user should not have the right "Skip comment approval".
Comment | File | Size | Author |
---|---|---|---|
#4 | 2877624-anonymous-reply-message-invisible-4.patch | 1.04 KB | kmetz |
Comments
Comment #2
bit-checker CreditAttribution: bit-checker commentedComment #3
qzmenko(EDITED) Closed by mistake. I did not notice that this applies to the 8 version of the module
Comment #4
kmetz CreditAttribution: kmetz commentedReopening, I can reproduce the issue (actually spent some time debugging it with the original reporter) and have a patch that solved it for us.
The "Notification Message" setting is unrelated. All works well with normally added comments.
But when you use the ajax-loaded reply form to reply to an existing comment as anonymous user, you won't get any feedback at all. The message response want's to attach itself to the newly added comment, which is not shown if you lack the "skip comment approval" permission, so the message needs to attach to the replied-to comment (like with errors).
A cleaner solution than the one in the patch might be to check the actual view permissions on the $comment entity. However, $comment->access('view') (instead of the hasPermission() call) always returned TRUE for anonymous users, which looks like an opportunity to debug deeper.
Comment #6
qzmenkoThanks, commited.