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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

calbasi created an issue. See original summary.

calbasi’s picture

Component: Documentation » Code

By the way, creating a comment email field at comments form don't solve this issue. I still get this error:

User error: Invalid placeholder (!types) in string: Anonymous commenters have the permission to subscribe to comments but cannot leave their contact information on the following content types: !types. You should either disable subscriptions on those types here, revoke the permission for anonymous users, or enable anonymous users to leave their contact information in the comment settings. in Drupal\Component\Render\FormattableMarkup::placeholderFormat() (line 235 of core/lib/Drupal/Component/Render/FormattableMarkup.php).

Then, I think this module is not ready to anonimous notification...

greggles’s picture

Title: Anonimous users email field » Anonymous users email field

That'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.

greggles’s picture

There 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.

gnuget’s picture

Component: Code » Documentation
Priority: Critical » Normal

HI 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.

gnuget’s picture

FileSize
120.68 KB

Here a screenshot:

gnuget’s picture

Status: Active » Needs review
FileSize
1.09 KB

Alright.

Patch attached.

gnuget’s picture

eh... wrong extension duh!

  • greggles committed 1edb068 on 8.x-1.x authored by gnuget
    Issue #2851055 by gnuget: Update documentation about anonymous email...
greggles’s picture

Title: Anonymous users email field » Update documentation about anonymous email field
Status: Needs review » Fixed

Thanks for the advice and patch, gnuget!

I've commtitted and pushed this change.

@calbasi - can you test out this suggested change?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.