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

Bug: Invited user is not shown if email fails #3229

Closed
sebgie opened this issue Jul 9, 2014 · 3 comments · Fixed by #3326
Closed

Bug: Invited user is not shown if email fails #3229

sebgie opened this issue Jul 9, 2014 · 3 comments · Fixed by #3326
Labels
affects:admin Anything relating to Ghost Admin bug [triage] something behaving unexpectedly

Comments

@sebgie
Copy link
Contributor

sebgie commented Jul 9, 2014

Issue Summary

If sending the invitation email fails due to a problem with the email service the invited user is not shown in the list of invited users immediately. After refreshing the page the user shows up.

In case of an email problem, the user is added to the database and an error (type: EmailError) is returned to the client. I think that it would be good to refresh the list and ask the user to fix the email configuration and resend the invitation in this case.

Steps to Reproduce

  1. break your email config
  2. invite a user
  3. error notification
  4. refresh screen to see user

Technical details

  • Ghost Version: master - latest commit: 09e03f4
  • Client OS: OSX 10.9.3
  • Server OS: Vagrant
  • Node Version: 0.10.26
  • Browser: Chrome
  • Database: sqlite3
@sebgie sebgie added this to the 0.5 Multi-user milestone Jul 9, 2014
@sebgie sebgie added bug labels Jul 9, 2014
ErisDS added a commit to ErisDS/Ghost that referenced this issue Jul 20, 2014
closes TryGhost#3309, refs TryGhost#3229

- adds different message depending on status
- doesn't delete the new user if the problem was an email error
- filters the 2 lists based on all statuses
@ErisDS
Copy link
Member

ErisDS commented Jul 20, 2014

So, I've implemented hack in #3326 which sort-of resolves this.

The underlying problem is that the email error means that the API responds with a 500 error, and only returns the error in the response. Therefore, ember doesn't get a new user added to its store properly, and the whole thing kinda breaks.

The new user is getting created successfully, so the response should probably be a 201. The error could be included as a warning header, or perhaps we should include both the successful object and the errors in the response - which ought to be downgraded to a warning (an orange notification on the client side).

That is, I'm suggesting we change the API to support returning a 200/201 status with a normal resource response body alogn with either an errors object or along with warning headers. Which ever of the 2 we use, the result should be a success with warnings, rather than a failure.

@ErisDS ErisDS reopened this Jul 20, 2014
@ErisDS
Copy link
Member

ErisDS commented Jul 20, 2014

This is working, but needs further resolution. Punting to the next milestone.

@ErisDS
Copy link
Member

ErisDS commented Aug 22, 2014

The bug is fixed, but we can fix it in a better way. I'm closing this, and have moved my comment on improving the API with support for warnings to #3850.

@ErisDS ErisDS closed this as completed Aug 22, 2014
@ErisDS ErisDS modified the milestones: 0.5.x Feature Release Backlog, 0.5 Multi-user Aug 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:admin Anything relating to Ghost Admin bug [triage] something behaving unexpectedly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants