User notification level revert after page reload

AI-generated summary

User Notification Level Revert After Page Reload

A bug has been reported where changing the user notification level on a user profile page reverts to the default level after reloading the page. This issue is not present on the settings page /preferences/users.

Don initially reported the bug and provided a screenshot. JammyDodger was able to replicate the issue on Meta and suspects that it was introduced between this version and the current version. Don and ondrej also confirmed the bug on their sites.

sam acknowledged the report and promised to resolve the issue. markvanlan investigated the cause and found that a recent commit introduced the bug by passing an object { level: "muted" } to the server instead of a string value. A PR has been created to fix the issue, which also addresses a JS deprecation and a server error when the level param is not valid. The PR is available for review at https://github.com/discourse/discourse/pull/16268.

Hello,

If I set the user notification level on user page it will revert to the default (which were you previously set up in settings to the user i think) level after reload the page.

On settings page /preferences/users it works fine.

Repro:

  1. Go to a user profile page
  2. Change the user notification level dropdown
  3. Reload the page

Thanks :slightly_smiling_face:

8 Likes

I can replicate this here on Meta.

Interestingly, I tried it on an older site and it works, so presumably something inbetween this version and now (508370e433).

4 Likes

Yeah thank you Jammy, I totally forget mention the Discourse version :smiley: I am on the latest 508370e433.

2 Likes

I can also repro this bug on meta and another site on latest.

3 Likes

Thanks for reporting … we will get this sorted over the next few days.

4 Likes

A recent commit caused an object { level: "muted" } to be passed to the server instead of a string value. I have a PR that fixes that issue, as well as the server throwing an error when the level param is not valid. For the review - it also fixes a JS deprecation due to overriding a computed property (by adding a set)

https://github.com/discourse/discourse/pull/16268

6 Likes