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.
Hi,
At INSTALL.TXT you have:
4. Configure the settings for comments for content types from S
tructure
> Content types > [Your content type] > Edit: "Comment setti
ngs"
- /admin/structure/types/manage/[your_content_type]
- e.g. /admin/structure/types/manage/page- Look for "Anonymous commenting" and set to either:
"Anonymous posters may leave their contact information" OR
"Anonymous posters must leave their contact information"
But this option has been removed from Content Type management at Drupal 8.
Then, how do it? Maybe adding an email field at comment entity?
Comment | File | Size | Author |
---|---|---|---|
#8 | 2851055-anon-users-field-7.patch | 1.09 KB | gnuget |
| |||
#7 | 2851055-anon-users-field-7.txt | 1.09 KB | gnuget |
#6 | settings.png | 120.68 KB | gnuget |
Comments
Comment #2
calbasiBy the way, creating a comment email field at comments form don't solve this issue. I still get this error:
Then, I think this module is not ready to anonimous notification...
Comment #3
gregglesThat's a bummer that it doesn't work for anonymous since that's one of the main points of the module :/ I agree this is a critical bug.
Comment #4
gregglesThere is an automated tests for anonymous users, see testCommentNotifyAnonymousUserFunctionalTest in src/Tests/CommentNotifyTest.php so I believe it should be possible to get it working. Here are the things it does:
1. Creates an article content type
2. allows comment on articles
3. allows anonymous commenting on articles
4. gives the anonymous role these permissions 'access comments', 'access content', 'post comments', 'skip comment approval', 'subscribe to comments'
5. Sets the 'notify' field to COMMENT_NOTIFY_NODE selection
6. Posts a comment
7. Fails to input an email address
8. Sees the proper warning about missing email address
9. Sets a random email address
10. Posts the same comment with the name field containing a name and mail field containing an email address
11. Looks at the db table to confirm data was saved
12. Replies to that comment
13. Confirms an email was sent to the email from step 10
And a bunch of other stuff is tested.
Comment #5
gnugetHI calbasi
The documentation hasn't been updated for D8 yet, the mail settings were moved into the comment field on the content type, for instance, if you have a content type called article and in the fields you have a field called "comment" then you can enter to:
yoursite.ltd/admin/structure/types/manage/article/fields/node.article.comment
There you can find the option called: "Anonymous commenting" which basically display the mail field on the comment form.
Comment #6
gnugetHere a screenshot:
Comment #7
gnugetAlright.
Patch attached.
Comment #8
gnugeteh... wrong extension duh!
Comment #10
gregglesThanks for the advice and patch, gnuget!
I've commtitted and pushed this change.
@calbasi - can you test out this suggested change?