Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Preferences are not saving when editing "Display Roles" preference #10001

Closed
Drangleic opened this issue Mar 4, 2018 · 7 comments
Closed

Comments

@Drangleic
Copy link

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

@TwizzyDizzy
Copy link

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

@rdnn
Copy link

rdnn commented Mar 4, 2018

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.

b5e9c9c#diff-b354e00a2baf2ca14af0351934a440aeR150

b5e9c9c#diff-63f37e12dfcaabc28394aeb10b3f8086R138

@Drangleic
Copy link
Author

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

@Drangleic
Copy link
Author

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

@ghost
Copy link

ghost commented Mar 5, 2018

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

@gabrielloberg
Copy link

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

.role-tag {
  display: none;
}

@MartinSchoeler MartinSchoeler changed the title User Preferences are not saving User Preferences are not saving when editing "Display Roles" preference Mar 5, 2018
@ryjones
Copy link
Contributor

ryjones commented Mar 5, 2018

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

@rodrigok rodrigok added this to the 0.63.0 milestone Mar 7, 2018
@rodrigok rodrigok added this to Desireable in 0.63.0 via automation Mar 7, 2018
0.63.0 automation moved this from Desireable to Done Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
0.63.0
  
Done
Development

No branches or pull requests

7 participants