I installed module and out-of-box got errors on the /admin/config/people/comment_notify page.

   The Default mail text for sending out notifications to commenters is using the following invalid tokens: [comment:node:title].
    The Default mail text for sending out the notifications to node authors is using the following invalid tokens: [comment:node:author], [comment:node:title], [comment:node:author:edit-url].

I removed invalid tokens and module works.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chegor created an issue. See original summary.

daria.a’s picture

Hello Yahor.
I have the same problem. Attached patch solves it.

daria.a’s picture

Status: Active » Needs review
renat’s picture

Status: Needs review » Reviewed & tested by the community

Patch from #2 solved this problem for me as well. Updates to the code seems reasonable, so mark it as an RTBC.

john.money’s picture

Missed one...

@@ -373,7 +374,7 @@ function _comment_notify_mailalert(CommentInterface $comment) {
       }
 
       $raw_values = $config->get('mail_templates.watcher');
-      $token_data = ['comment' => $comment, 'comment-subscribed' => $alert];
+      $token_data = ['comment' => $comment, 'node' => $node, 'comment-subscribed' => $alert];

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 5: comment_notify-2684153-02.patch, failed testing.

chegor’s picture

Status: Needs work » Needs review
FileSize
3.66 KB

Updated patch to fix failed tests on d.org

john.money’s picture

@chegor, appreciate the rerolls!

gnuget’s picture

Status: Needs review » Reviewed & tested by the community

I just tested this and it is working great.

What do we need to this be committed?

gnuget’s picture

I wrote a quick test, hope this helps to fix the issue.

:-)

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 10: comment_notify-2684153-10-only-test.patch, failed testing.

gnuget’s picture

Status: Needs work » Reviewed & tested by the community

  • greggles committed d9b9af0 on 8.x-1.x authored by daria.a
    Issue #2684153 by gnuget, chegor, john.money, daria.a: Invalid tokens
    
greggles’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the tests, gnuget and thanks for your work on this, everyone else!

Now committed.

greggles’s picture

Status: Fixed » Closed (fixed)

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

DamienMcKenna’s picture