Just merged it. Thanks @david!
thanks a lot @joebuhlig and @david for your quick help. works perfectly fine.
Hi Matthew, just wondering if you ever found the cause of your problem? i think Iām experiencing the same issue, where the plugin is installed but doesnāt seem to be functioning or sending out summaries.
hi @joebuhlig, we are using discourse-mlm-daily-summary and it works fine for the most part.
one thing: there are some of our 1000 users where the daily summary is not send out. i checked a lot of options and cant find a pattern.
i checked the source code and found this part being crucial. is there more code that might be part of the decision if a user gets the daily summary?
def target_user_ids
# Users who want to receive daily mailing list emails
enabled_ids = UserCustomField.where(name: "user_mlm_daily_summary_enabled", value: "true").pluck(:user_id)
User.real
.activated
.not_suspended
.not_silenced
.joins(:user_option)
.where(id: enabled_ids)
.where(staged: false)
.where("#{!SiteSetting.must_approve_users?} OR approved OR moderator OR admin")
.where("date_part('hour', first_seen_at) = date_part('hour', CURRENT_TIMESTAMP)") # where the hour of first_seen_at is the same as the current hour
.where("COALESCE(first_seen_at, '2010-01-01') <= CURRENT_TIMESTAMP - '23 HOURS'::INTERVAL") # don't send unless you've been around for a day already
.pluck(:id)
end
i checked:
- user_mlm_daily_summary_enabled is enabled for all users
- users are all not_suspended, not_silenced, staged:false
- users have all been around longer than a day
- site setting must_approve_users is false
- first_seen_at is set for all users (wasnāt for some in the beginning and i suppose if there is no āhourā of first_seen_at no summary is being sent, right?)
- i donāt know what .real and .activated is
do you have any idea where else i can check?
thanks in advance, etienne
Can you confirm that the users have their preferences set correctly?
you mean āuser_mlm_daily_summary_enabledā?
yes - is enabled via API by us for all user - and deactivated via CSS in the preferences (cant be disabled by users). i checked this setting in the database for all users.
by the way: these users DO get other mails from discourse ā¦
Anything in /logs
that seems relevant? Itās been quite a while since any tweaks have been made to this so Iām guessing something may have been deprecated by now?
no relevant entries in /logs
How about in admin/email/skipped?
thanks for the tip, but no skipped mails beside āanonā-users (anonymized by discourse)
hi @joebuhlig,
after looking further into this we found what caused that users didnt get the daily summary:
all users that have been added after the latest commit on sept 15 2018 have a value 't'
or 'f'
in the field value
of table user_custom_fields
, while the plugin expects 'true'
or 'false'
.
we suspect that in the changes of the last commit something went wrong and type bolean and text got mixed up.
we would very much appreciate if you could have a look and maybe fix this. we are relying on the plugin for the purpose of our discourse-installation - sending information to parents about whats going on in the school of their kids once a day.
thanks, etienne
Got it. Iāll get the ProCourse team on this one. But note that this one doesnāt fall under our list of ProCourse owned plugins so it may take a bit to complete.
Regardless, thanks for deep diving to find the solution here.
thanks a lot for looking into this! would be great to see a fix - whatever timeframe. we now have a workaround for the moment (fixing those entries by hand in the database ;-).
Hello,
how can i do a translation for this plugin?
My community is german based and its better when we have our native language in this plugin.
My second question is. How can i change the template of the summary?
Under the New topics and Topic updates section are listened the categories.
But my wish is that are the category names again under every topic name in the list.
Here you are:
hey @joebuhlig, any news about the possible bugfix for mlm_daily_summary? thanks, etienne
Itās probably at least a couple weeks out. Weāve got a handful of clients with ongoing work weāre trying to cover right now. If you want this to go into that queue, it would land at $200. Otherwise, we have to wait for a lull in that work before jumping into one of these unsupported plugins.
hi @joebuhlig, as we are running the forum for the school of our kids to give parents a better insight in their participation and we are doing this as volunteers we dont have any money to spend. there is one feature though that might be interesting enough to raise money and if you could include it we would try to find the money:
exclude topics from the daily summary that have already been send to users because they are watching a topic.
or maybe thats already a hidden feature, we didnt find?
let us know if it would be an option for your team to add this and fix the bug in one package and what we would need to raise for this. what do you think?
Thatās a standard feature of Discourse that I think this plugin was designed to disable.
If youāre sending out daily summaries and donāt have to many messages per day and people know how to watch categories, the standard behavior might be all you need.