Changing Username Stops Email Notifications

Hi All,

I’ve managed to reproduce this several times on two Discourse installs.

  • Create User, assign to group
  • Create category, llock category to group
  • User is Watching that category
  • Change that User’s username

Post in that category as admin or reply to post by user and the system doesn’t even bother generating emails notifying that person of posts.

It doesn’t appear in the skipped logs or in ‘sent’.

Can anyone else see this happening?

Thanks!

EDIT: this is actually caused by a bug that has been repaired and spoken about more accurately here:

2 Likes

How often are you changing people’s usernames? There’s a reason we lock this 2 days after signup for users.

The one in question that isn’t a test one I changed after about 2 hours.

I mean how often do users need to change their username, in general. Every day? Every week? Every user every day? Every user every week?

Basically never - I did it because they made a typo when signing up.

Does it fix it if, after the rename, the user unwatches and re-watches the category? Just as a workaround.

1 Like

Giving that a shot now - have tried just about everything else (adding/removing from Group etc).

Unfortunately that hasn’t worked … the period for editing prior to sending has expired and it hasn’t tried to send it :confused:

Anything else worth refreshing?

EDIT: have removed and re-added to group as well and impersonating the user gets the notifications, but no emails are being generated.

@techapj can you have a look at this?

I am unable to repro this.

For debugging purpose, @JamesNorth can you try enabling “Send me email notifications even when I am active on the site” for that user (via user preferences), and see if the user receives email?

2 Likes

Thanks for checking it out @techAPJ.

Yes, this is enabled for all users on my forum. Just double checked - yes, this user has it enabled.

When I assume their identity I can see that they have access to the right category, they are watching that category and are getting the notifications up the top, but nothing is generating email-wise.

Are other people getting notifications or is this a global problem? Is Sidekiq working properly to execute background tasks on your Discourse?

1 Like

Yes - everyone else is getting email notifications as per their individual settings (including me as admin in that same category that I am also watching). In the time since I started this thread here there have been a number of normal email notifications be sent to various users.

Sidekiq is working normally - only thing queued up is the next backup in like 8 hours.

The only thing unique to this user is that it’s the only account that has had its username changed by me. It was created by the user from an invite I sent as admin … then I changed it for them as they made a typo.

It’s the only time I’ve ever had email notifications not work according to settings.

Just to confirm as well, that same category is not muted by that user (not sure what happens if someone mutes and watches something … but yeah it’s not that.


I’m actually just going to update to latest and re-check the things we’ve chatted about thus far.

Updated to latest - still the same problem.

I wonder … would the fact that the username is now identical to the group name have anything to do with it?

I have plenty of this happening (same username and group name) as I’m locking people down on a per-category basis, but wonder whether retrofitting a username into a group with the same name may be related to this issue?

At a bit of a loss, but there will always be an answer!

That’s definitely not recommended. Groups and users share a namespace. I don’t even think that’s supposed to be possible.

1 Like

That is interesting then.

At this stage I have almost every other user (about 80 users on this one) with the name username and group name and that all works perfectly.

This is the only user that I have changed the username for (and it is identical to the group name).

I just tried changing the group to have an _ in the name … made a post, but still no email.

What I tired here is nuking that account completely and recreating that whole category etc.

It still won’t send that person emails … so it’s not relating to changing the username.

Is it a new thing that Groups and Usernames being the same break email notifications?

It certainly hasn’t been a problem until this month and that person is still receiving normal popup notifications … it’s just emails that aren’t sending (ignoring watching and send emails even if they were here recently).

1 Like

Email notifications not working (OP regarding Username Change not causing this)

I’ve got a second account that’s doing this now as well.

  • They were both created about the same time (a few weeks ago) and neither account have username and group names matching.

  • They are watching only the category they are locked down to and are receiving popup notifications about the reply, but it doesn’t list an unread post and doesn’t send an email out.

  • They were both created by sending them an account creation link that would automatically join them to a group that would lock them to a category.

Nothing is presenting in the error logs area of the web interface. Is there somewhere else I can look to try to debug this?

Has anything changed recently with respect to emails being sent when someone is watching an entire category?

Accounts that were created before about a month ago are all working perfectly as they used to.


EDIT: just tried sending user a PM and that emailed off perfectly, so it seems to be related to watching a category and these two things not happening:

  1. not registering new posts as ‘unread’ and
  2. subsequently not sending email notifications.
1 Like

Long shot, but any change you’ve muted the category and/or topics within? There was a bug (since resolved) a week or so ago regarding this…

4 Likes

No - double checked it but the only thing I’ve done with these new users is watch it …