Editing category settings causes category to be muted for the current user

AI-generated summary

A critical bug was reported where editing a category’s settings—without changing any values—causes the category to be muted for the current user. david documented the steps to reproduce: navigating to a category, clicking ‘Edit,’ saving without changes, and observing the notification level switch from ‘Normal’ to ‘Muted.’ Dev tools revealed an unintended POST request to the notifications endpoint after saving, suggesting a client-side issue. j.jaffeux initially doubted the cause was related to recent notification level UI changes but later confirmed the component was likely responsible. After investigation, j.jaffeux fixed the category issue and was working on a related problem affecting topics. The fix was committed in this commit. codinghorror emphasized the severity of the regression and urged close monitoring of customer support as affected sites may report missing posts or unexpected muting behavior. The bug appears to stem from recent UI changes and affects all categories on the forum, potentially explaining prior support requests like this one.

I think this is quite a serious bug:

  1. Go to a category
  2. Look at the buttons in the top right, notice I have “normal” notification level
  3. Click edit
  4. Don’t change any settings
  5. Click “save”
  6. Page refreshes, observe notification level has changed to “Muted”

I am running the absolute latest tests-passed (updated 10 mins ago), and can replicate this on every category on my forum.

Looking at my dev tools, it looks like a POST is being sent to the notifications endpoint immediately after clicking save on the category settings.:


(ignore poll/results items, they’re messagebus/mini-profiler respectively)

I’ve noticed a few support requests on meta that are probably caused by this. For example, this topic.

I am also seeing some random topics change to a muted state, but can’t reproduce this consistently. The root cause might be the same.

The extra POST request makes me think this is a client-side issue rather than server-side. @j.jaffeux could this be related to the select-box changes for notification levels?

6 Mi Piace

Well this would be very unlikely caused by the component… but nothing astonishes me in programming. Let me try to remove the component from the page to see if I can still reproduce.

3 Mi Piace

Probably related to the component, no idea why atm, I will investigate and push a fix, thx.

2 Mi Piace

I have the fix for categories, I’m looking at topics, and I have some chicken and egg problem, but will find a solution.

4 Mi Piace

Should be fixed by:

https://github.com/discourse/discourse/commit/7a4ddc2bb1bc2e353c67ce3846229b551d0603de

Will track it once deployed.

6 Mi Piace

Wow this is a very bad regression. You’ll need to track this closely and monitor customer support for sites affected :frowning: