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

Password reset doesn't complete #6229

Closed
ErisDS opened this issue Dec 15, 2015 · 3 comments · Fixed by #6231
Closed

Password reset doesn't complete #6229

ErisDS opened this issue Dec 15, 2015 · 3 comments · Fixed by #6231
Labels
bug [triage] something behaving unexpectedly p1:priority [triage] Priority for immediate patch release

Comments

@ErisDS
Copy link
Member

ErisDS commented Dec 15, 2015

The password reset form isn't completing it's job of resetting your password and logging you in with your new password.

Filling out the form and hitting submit seems to send the data to the submit() function on the controller, but it gets stuck somewhere after. There doesn't seem to be an ajax call, and there's no redirect.

@ErisDS ErisDS added bug [triage] something behaving unexpectedly p1:priority [triage] Priority for immediate patch release labels Dec 15, 2015
@ErisDS
Copy link
Member Author

ErisDS commented Dec 15, 2015

Seems to me that the call to validate() is not working somehow. There are no errors and that code doesn't get executed.

The only thing I could spot so far were double parenthesis here: https://github.com/TryGhost/Ghost/blob/master/core/client/app/controllers/reset.js#L40

Stumped :/

kevinansfield added a commit to kevinansfield/Ghost that referenced this issue Dec 15, 2015
closes TryGhost#6229
- removes `_super` call in the reset route's `setupController` hook to avoid a `model` property being set which was being picked up by the validation engine
- throw the error if we fail in the password reset process from something we aren't expecting
@kevinansfield
Copy link
Contributor

Yeah, it was a bit of a strange one. We were swallowing errors in the .catch which is always helpful when trying to debug 😬

Inspecting the error raised showed that the validation engine was failing with the error model.get is undefined which also seemed very strange until realising that we were actually depending on that route not having a model - something that I broke when during the this._super PR 😊 as setupControllers default method is to take the model and attach it to the controller.

@ErisDS
Copy link
Member Author

ErisDS commented Dec 16, 2015

I swear I tried logging out the error in all sorts of ways inc arguments, this.get('errors') etc but I never once saw an error message. That was half my bafflement.

I got as far as realising that the only thing it was getting for the model was the token in the validation engine validate method, but I had no powers to discern why. Very glad one of us knows this stuff 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [triage] something behaving unexpectedly p1:priority [triage] Priority for immediate patch release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants