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

Wrong url and bug in settings nav after changing user settings #5847

Closed
svbergerem opened this issue Apr 3, 2015 · 2 comments
Closed

Wrong url and bug in settings nav after changing user settings #5847

svbergerem opened this issue Apr 3, 2015 · 2 comments

Comments

@svbergerem
Copy link
Member

svbergerem commented Apr 3, 2015

When changing user settings the users controller renders the edit page which leads to a wrong url (pod.tld/user) and a settings nav with no selected active page. Before #5580 it redirected to the user edit page which is not possible anymore because it would break the validation errors added in #5580.

@cmrd-senya
Copy link
Member

First I tried to change the PUT/PATCH route from /user to /user/edit so it matched the proper page URL on UsersController#update action.

But that didn't help with the styling of the navbar! As it turned out, the current_page? method used in the navbar template returns false on every request that is not GET or HEAD. Replacing the calls with a simple own current_path? method fixed the thing. There are still some issues from #6801 left which are probably caused by the same thing, but otherwise it works as expected.

Tell me please, if the approach is generally fine and I will prepare a PR then.

@Flaburgan
Copy link
Member

I don't know if it's the same issue but a similar problem exists on the sign up page. If you submit the form with some errors (for example, email already token, or the two passwords don't match) then the page will reload with a broken design.

SuperTux88 added a commit to SuperTux88/diaspora that referenced this issue Aug 10, 2016
Fixed:
* wrong url
* broken navigation
* broken design
after saving the user settings

Fixes diaspora#5847
@jhass jhass added the bounty label Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants