Mailing list mode - broken experience in transition from 1.5->1.6

AI-generated summary

Users reported a critical issue in Discourse 1.6 where upgrading from 1.5 caused mailing_list_mode to revert incorrectly. While the mailing_list_mode flag remained True, the mailing_list_mode_frequency defaulted to 0 (daily) instead of the expected 1 (every post), breaking the experience for users who opted in to individual emails 1.

@tobiaseigen confirmed the issue and shared a SQL query to identify affected users. In response, @gdpelican submitted a Pull Request to fix the default for new accounts. However, @sam noted this did not address existing users with incorrect historical data. A one-off migration was required to set the frequency to 1 for all legacy accounts, accepting that this might override any manual changes made by users. This fix was implemented in commit 8c3a0b4. Following the resolution, the team confirmed the fix was merged into the beta branch and a new image was released to address the upgrade path 13.

Relevant topic - Mailing list mode keeps reverting to daily updates

I help run a Discourse forum where we had actively encouraged users to check the box saying “Send me an email for every post” - aka, set mailing_list_mode = True.

With the new mailing list mode, those users all have mailing_list_mode = True, but apparently by default have mailing_list_mode_frequency = 0. As a result, they’re no longer getting the individual emails per post that they expected.

Two issues -

1 - users that previously had mailing_list_mode = True should automatically be opted-in and have the mailing_list_mode_frequency set to the relevant value. (Right?)

2 - what’s the right way to make that change at scale for our users?

cc/ @ryanwanger

6 Likes

Hmm we should handle this better @erlend_sh @zogstrip

1 Like

I experienced this as well, though in the end only a handful of people had mailing list mode turned on at all and were affected. I was able to write to them directly to sort it out. So it was a fairly easy transition once the settings bug was fixed. Unfortunately one of those people was my CEO who was not especially happy about it.

To find out who had mailing list mode turned on and the frequency, I used this data explorer query and then exported to csv.

SELECT user_id,mailing_list_mode,mailing_list_mode_frequency from user_options

1 Like

Just to clarify, would just setting mailing_list_mode_frequency = 1 for all the people who had mailing_list_mode set to true be the correct fix?

1 Like

Yes - I think it’s fair to assume that is correct. When I look at the data explorer results and compare against the user preferences, it matches up.

1 Like

I’ve put in a PR to set the frequency default correctly for folks who haven’t upgraded yet:
https://github.com/discourse/discourse/pull/4241/files

7 Likes

Hmm this only fixes brand new account going forward, there is the huge problem of “history” which is now wrong :frowning:

To get out of this pickle we are going to have to add a once off migration that sets everything 1 on that table, which means we break any people that changed stuff. @neil released a new image yesterday so, ouch.

3 Likes

This is fixed per:

https://github.com/discourse/discourse/commit/8c3a0b44baea3388db4b719766a961d3a2114fc9

Sorry but this is the best we can do.

  • The new default for “mailing list mode frequency” is daily, site admins can change.

  • The “mailing list” warning screen is gone cause it no longer makes sense

  • After running the migration all old accounts that had mailing list enabled will be switched to the “every email” frequency, to match old behavior.

6 Likes

Should this fix also go into the beta branch? I’m holding off from upgrading right now because of this issue.

maybe, @neil can you perhaps do another bump early in your morning with today’s fixes?

5 Likes

Version has been bumped!

5 Likes

This topic was automatically closed after 24 hours. New replies are no longer allowed.