Rocket.chat: User Preferences are not saving when editing "Display Roles" preference

Created on 4 Mar 2018  路  7Comments  路  Source: RocketChat/Rocket.Chat

Description:

No users are able to save their preferences when going to My Account --> Preferences. The save button does not seem to trigger any action, and preference changes are reverted upon reloading the page. This is experienced with both regular users and Admins.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.62.1
  • Operating System: Ubuntu Server 16.04 LTS
  • Deployment Method(snap/docker/tar/etc): tar
  • Number of Running Instances: 2
  • DB Replicaset Oplog: enabled
  • Node Version: 8.9.3
  • mongoDB Version: 3.6

Steps to Reproduce:

  1. Go to My Account --> Preferences
  2. Change any option
  3. Try to click save

Expected behavior:

User preferences are saved and retained properly upon clicking Save.

Actual behavior:

No submit action happens upon clicking save, and user preferences are not saved.

Relevant logs:

Browser:

VM2666:1 Uncaught SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse ()
at f.TemplateInstance.save (85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:245)
at Object.click .rc-header__section-button .save (85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:245)
at 85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:87
at Function.e._withTemplateInstanceFunc (85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:87)
at f.View. (85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:87)
at 85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:87
at Object.f._withCurrentView (85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:87)
at f._DOMRange. (85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:87)
at HTMLButtonElement.delegatedHandler (85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:87)
save @ 85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:245
click .rc-header__section-button .save @ 85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:245
(anonymous) @ 85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:87
e._withTemplateInstanceFunc @ 85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:87
(anonymous) @ 85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:87
(anonymous) @ 85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:87
f._withCurrentView @ 85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:87
(anonymous) @ 85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:87
delegatedHandler @ 85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:87
dispatch @ 85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:9
h.handle @ 85b95b6c461d9ea5aa30e778b6ec375dfd1e080c.js?meteor_js_resource=true:9

user settings bug

All 7 comments

Hi @Drangleic

I cannot confirm this on 0.62.1 (as on https://open.rocket.chat) on Chromium 64.0.3282.119 ...

What browser are you using?

Cheers
Thomas

I was able to duplicate this on 0.62.1 in Safari and Chrome.

If "Display Roles" is set to false (Administration > Layout > User Interface), the hideRoles option is not displayed (along with associated form controls), but JSON.parse() is still being run against a non-existant form control.

https://github.com/RocketChat/Rocket.Chat/commit/b5e9c9c09d4c42eeb4655bebe5a6ec43578c9ab9#diff-b354e00a2baf2ca14af0351934a440aeR150

https://github.com/RocketChat/Rocket.Chat/commit/b5e9c9c09d4c42eeb4655bebe5a6ec43578c9ab9#diff-63f37e12dfcaabc28394aeb10b3f8086R138

Hi @TwizzyDizzy , I'm using Chrome 64.0.3282.186. This issue has been confirmed by many of our users.

@rdnn Thanks!! I switched Display Roles to true and now I am able to save user preferences.

Ok. Switching "Display Roles" to true works for me too for now.

+1. Display roles trick worked. I hid them again with custom CSS

.role-tag {
  display: none;
}

This is impacting https://chat.hyperledger.org/ as well. 0.62.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattlin picture mattlin  路  3Comments

zeigerpuppy picture zeigerpuppy  路  3Comments

karlprieb picture karlprieb  路  3Comments

sta-szek picture sta-szek  路  3Comments

tanc picture tanc  路  3Comments