Restore Mailing List Mode Daily Summary

Good Morning,

these fix is working good. But one code problem i have seen.

At the end of your code. I must write an end after email. Otherwise the code is not working in my fork.
Yesterday i become two summarys. Today i will look if is again.

Thanks for your hotfix.

1 Like

Hello together,

for some days now, a lot of Mails are not sent. The Sidekiq error is:

Jobs::HandledExceptionWrapper: Wrapped ActionView::Template::Error: wrong number of arguments (given 1, expected 0)

Further information on the jobs:
Job: Jobs::UserEmail
Arguments: {"type"=>"mailing_list", "user_id"=>4242, "current_site_id"=>"default"}

Is this also caused by the mailing list mode plugin?
We are running Discourse 2.5.0.beta1.

Any ideas how to solve this problem? Sidekiq already reports near 10k unsent mails :frowning:

There is a line in the mage template, I can’t remember it exactly, but it’s something to do with color, I think, and it’s calling a function that used to take an argument and now doesn’t. That’s not much of an answer, but more of a hint

This change also broke a plugin that u wrote that changes the mail template.

1 Like

Hey Jey, thanks for your hint!

Could you specify “mage tempelate”? I have no clue what you mean and can’t find anything in the gitlab commits.

Edit: Never mind. I found it! Will update how to fix the issue soon

1 Like

How to fix “Wrong number of arguments” error that occurs since Feb 2020

Change that Broke the Plugin:
https://github.com/discourse/discourse/commit/e6e5ce3c5413b2fa85d87660bc443dfb1557576c#diff-02249fe8c00b2c8cc50e18db8a57fae0

Fix:
In app/views/user_notifications/mailing_list.html.erb find this line:

<%= raw(t 'user_notifications.mailing_list.why', site_link: html_site_link(@anchor_color), date: @since_formatted) %>

and remove the (@ancor_color) so it reads

<%= raw(t 'user_notifications.mailing_list.why', site_link: html_site_link, date: @since_formatted) %>

Done!

2 Likes

flagged as #plugin:broken-plugin till this is fixed.

2 Likes

Thanks @_fuchs!
I have changed it and made a pull request.

Given the fact that @joebuhlig does not seem to be around much more :frowning: you can also use our repository https://github.com/communiteq/discourse-mlm-daily-summary.

@sam maybe (at least temporarily) change the link in the start post to that one?

1 Like

Just merged the PR. Thanks for submitting that.

3 Likes

Is this plugin still being maintained? Is there another way to get daily summary emails?

1 Like

Last commit to the plugin by @joebuhlig was in March 2020. He was last seen at this Discourse in June 2021.

Dear Joe, in case you read this: Thanks for this plugin! Is there any way to limit the summary emails to the categories the user actually selected as opposed to “all categories on the server”?

What do you mean by “the categories the user actually selected” ?

That plugin does take category permissions and notification mutes into account already.

So it takes all categories by default, except the ones that are muted, but it ignores if a category is watched/followed or not?

It is like that. Cool. Thanks.

But: Is there any way to include the private messages in the daily summary? If one puts “Send me an email when someone messages me” to “never” in order not to receive other emails, one also doesn’t receive private messages via mail at all :frowning:

What you’re saying is that if someone says they don’t want to receive emails for PM’s, they don’t get emails for PM’s. That sounds right. Or do I misunderstand?

1 Like

Thanks for reacting. Actually it’s different: As I also mentioned in https://meta.discourse.org/t/send-me-an-email-when-someone-messages-me/ , there are two settings one can put to “always”, “when away” and “never”:

  1. “Send me an email when someone messages me” (actually means “… when there is a new post in a category I watch/follow”)
  2. “Send me an email when someone quotes me, replies to my post, mentions my @username, or invites me to a topic”,

When I enable “daily summary”, I don’t want to get every message about every category I watch/follow via mail in parallel, right? Because that’s the point of a daily digest.

In order to achieve that, I put 1 to “never”. Then I only receive emails, when somebody replies directly to one of my posts, mentions me or invites me to a topic (2).

Now when somebody sends a private message, that one is not covered by 2, so I won’t receive it, until I visit the website. Why would I do that, since I receive all post via daily digest?

That is incorrect. From that same topic:

And also here.

1 Like

When I deactivate “Send me an email when someone messages me” I don’t receive any notifications for any groups anymore. Is there maybe some other setting that interferes here?

Do you mean “any emails” or “any notifications” ? Sorry for the hair-splitting but it makes a big difference. The settings we’re discussing right now determine whether a notification generates an email. They should not interfere with the actual notifications being generated.

I suppose that “someone messages me” also includes group messages.

any emails.

Even if they not directly address you, but you’re just watching/following a category, yes.

Question remains: How does one receive one digest email per day, no separate mail for every topic and some kind of mail for personal messages send directly to himself/herself? :wink:

Again: no. First drop down is for everything we call a “message”, second drop down is for everything that happens in categories/topics.

  • Install the MLM Daily Summary plugin.
  • Send me an email when someone messages me: only when away
  • Send me an email when someone quotes me, replies to my post, mentions my @ username, or invites me to a topic: never
  • Watch/track categories: my/preferences/categories and select all categories you want to include in the daily digest