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 个赞

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 个赞

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 个赞

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 个赞

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

2 个赞

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 个赞

Just merged the PR. Thanks for submitting that.

3 个赞

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

1 个赞

插件 上一次提交是在 2020 年 3 月,由 @joebuhlig 提交。他最后一次出现在此 Discourse 是在 2021 年 6 月。

Joe,如果你看到这条消息:感谢你提供的这个插件!有没有办法将摘要邮件限制在用户实际选择的类别,而不是“服务器上的所有类别”?

“用户实际选择的类别”是什么意思?

该插件已经考虑了类别权限和通知静音。

所以它默认获取所有类别,除了已静音的类别,但它会忽略类别是否被关注或已跟进?

就是这样。太棒了。谢谢。

但是:有没有办法将私人消息包含在每日摘要中?如果将“有人给我发消息时给我发邮件”设置为“从不”,以免收到其他邮件,那么您也根本不会通过邮件收到私人消息:(

你的意思是,如果有人说他们不想收到 PM 的电子邮件,他们就不会收到 PM 的电子邮件。听起来没错。还是我理解错了?

1 个赞

感谢您的回复。实际上情况有所不同:正如我在 https://meta.discourse.org/t/send-me-an-email-when-someone-messages-me/ 中提到的,有两个设置可以设置为“始终”、“不在时”和“从不”:

  1. “当有人给我发消息时给我发电子邮件”(实际上意味着*“当我关注/跟踪的类别有新帖子时”*)
  2. “当有人引用我、回复我的帖子、提及我的@用户名或邀请我加入某个主题时给我发电子邮件”,

当我启用“每日摘要”时,我不想同时收到我关注/跟踪的所有类别的每条消息的电子邮件,对吗?因为这就是每日摘要的意义所在。

为了实现这一点,我将 1 设置为“从不”。然后我只会收到电子邮件,当有人直接回复我的帖子、提及我或邀请我加入某个主题时(2)。

现在,当有人发送私人消息时,这不包括在 2 中,所以我不会收到它,直到我访问网站。既然我通过每日摘要收到所有帖子,为什么还要这样做?

这是不正确的。来自同一主题:

还有这里

1 个赞

当我停用“有人给我发消息时给我发邮件”时,我不再收到任何群组的通知。是否有可能有其他设置会干扰此功能?

您是指“任何电子邮件”还是“任何通知”?抱歉吹毛求疵,但这很重要。我们现在讨论的设置决定了通知是否会生成电子邮件。它们不应干扰实际通知的生成。

我猜“有人给我发消息”也包括群发消息。

任何电子邮件。

即使他们没有直接称呼您,但您只是在关注/订阅某个类别,是的。

问题仍然是:一个人如何每天收到一封摘要电子邮件,而不是每封主题都有单独的邮件,以及某种直接发送给自己的个人消息邮件? :wink:

再说一遍:不是。第一个下拉菜单用于我们称之为“消息”的所有内容,第二个下拉菜单用于类别/主题中发生的所有内容。

  • 安装 MLM Daily Summary 插件。
  • 当有人给我发消息时给我发邮件:仅在离开时
  • 当有人引用我、回复我的帖子、提及我的@用户名或邀请我加入某个主题时给我发邮件:从不
  • 观看/跟踪类别:my/preferences/categories 并选择您想包含在每日摘要中的所有类别