2.1 Email notifications no longer contain post content

I'm an admin and my forum is mostly email-based, that is, most people don't visit the site often, they read email updates and only occasionally respond.

Upgraded to 2.1 last night, and now my discussion and comment email notifications no longer contain the poster's content -- only a link to view the post:

"Daniel commented on [Discussion].

Follow the link below to check it out:
http://etc.

Have a great day!"

Before, all those emails contained the text of the poster's comment (plain text, no html).

Desperately need the email notification content back, and can't find anywhere in the dashboard or user preferences that I could have turned it off. I set up some new dummy accounts with all default notification settings (and various roles), and they all experience the same thing.

How do I get the content back in my email notifications?

My only enabled plugins/apps: WYSIWYG (CLEditor) and Conversations.

«1

Comments

  • Also: just noticed that for PM email notifications, message content is still included. But I can't find code differentiating general email notifications vs. PM's that would explain the difference.

    Anyone know where I can find that so I can tinker? Feel like I'm taking crazy pills, I don't see anything about it anywhere I would expect to look.

    vrijvlinder
  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited May 2014

    Feel like I'm taking crazy pills

    Welcome to the community..

    most of that is done in $Definitions which is a locale file.

    You should also have the mime type text/html in the config.php for the Garden Email.

    $Configuration['Garden']['Email']['MimeType']= 'text/html';

  • Will nose around in there. Thanks.

    vrijvlinder
  • peregrineperegrine MVP
    edited May 2014

    I think the Definition route in vanilla 2.1 may be one of these red herring things...

    red herring

    But i want to be wrong in this case. :)

    I don't think their is an easy way to do it or if you can do it via definitions, which I doubt you can in vanilla 2.1 (someone will have to prove me wrong with the exact code that works to add the body via a definition in vanilla 2.1. See if you can win this challenge V).

    2.1 is alot different than 2.0 in messages as you noticed. the code is as well.

    you can't change it easily

    you may need to hook into before notification.

    it vanilla/applications/dashboard/models/activitymodel.php

    you could hook into 'BeforeSendNotification'

    and modify the $Email->Message($Message);

    but you may also need to get the body of the comment to append it to the email

    don't know if its still available by that time or you may to do a sql lookup.

    there may also be something on github concerning this. I can't recall

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinder
  • peregrineperegrine MVP
    edited May 2014

    what about running a mailing list program.

    http://www.lsoft.com/

    or a free listserv open-source software.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Out of our price range, sorry, we're a small open-source group. No budget.

  • Here's what's funny: presumably this very community forum is running 2.1? And I'm getting content from your replies in my inbox just fine.

  • ah, theres's a clue. look at the master source 2.2.x on github and you may find how they do it differently.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @linc shed any light here!

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited May 2014
  • Was considering adding that, but saw in the comments that plugin sometimes had an issue with showing content from closed/hidden categories to users who should not be able to see those categories. That would be an issue for me.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    You could fine tune it by adding more permission checks maybe... I guess first you need to get the emails to have content. You can later worry about the permissions.

  • @peregrine said:
    ah, theres's a clue. look at the master source 2.2.x on github and you may find how they do it differently.

    Just to be clear, the "Master" at https://github.com/vanilla/vanilla is version 2.2.x, correct?

  • peregrineperegrine MVP
    edited May 2014

    Just to be clear, the "Master" at https://github.com/vanilla/vanilla is version 2.2.x, correct?

    yes,

    but it didn't provide any clues to me. I wasn't recommending to use the master on any self-hosted forum (that would be a bit crazy) ,but just to see if there were any clues as to something that might give insights to the ops issue.

    but it should be doable by someone writing a plugin that calls event. just got to test it well.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Thanks, yeah, I'm concerned about that, too - Esp. since the activitymodel is completely different.

    in 2.1, there's the following code (in class,activitymodel.php):

    if ($Activity['Story']) {
             $Message = sprintf(T('EmailStoryNotification', "%3\$s\n\n%2\$s"), 
                   Gdn_Format::PlainText($Activity['Headline']),
                   $Url,
                   Gdn_Format::PlainText($Activity['Story'])
    
          } else {
             $Message = sprintf(T('EmailNotification', "%1\$s\n\n%2\$s"), Gdn_Format::PlainText($Activity['Headline']), $Url); 
          }
    

    This is supposed to be returning the body, but I'm not sure the ($Activity) is processing correctly.

    vrijvlinder
  • I apologize for my earlier comment about 2.1 and 2.1 being completely different - I discovered I was comparing the wrong files. (Sometimes taking a break does help)

  • peregrineperegrine MVP
    edited May 2014

    and the trick is a hitherto unknown config statement

    try adding this line to /conf/config.php

    $Configuration['Vanilla']['Activity']['ShowCommentBody'] = TRUE;

    it worked for me

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinderhgtonightUnderDog
  • peregrineperegrine MVP
    edited May 2014

    @ginny42

    did this work for you? http://vanillaforums.org/discussion/comment/209076/#Comment_209076

    if so, you mark the question as answered.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Different time zones, sorry! Just getting up & on it. Will report back.

  • Yep, that fixed it for me, Thank you very much!

    vrijvlinderhgtonight
«1
Sign In or Register to comment.