-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Unable to delete a user, causes all subsequent db requests to fail #7137
Labels
bug
[triage] something behaving unexpectedly
server / core
Issues relating to the server or core of Ghost
Comments
kevinansfield
added
bug
[triage] something behaving unexpectedly
p1:priority
[triage] Priority for immediate patch release
labels
Jul 25, 2016
This bug exists also in |
The bug only exists when using |
kevinansfield
added
server / core
Issues relating to the server or core of Ghost
and removed
p1:priority
[triage] Priority for immediate patch release
labels
Jul 25, 2016
Merged
kirrg001
added a commit
to kirrg001/Ghost
that referenced
this issue
Sep 19, 2016
closes TryGhost#7137 - fix destroying event for post
ErisDS
pushed a commit
that referenced
this issue
Sep 19, 2016
closes #7137 Deleting the content from the database runs in a transaction. see https://github.com/TryGhost/Ghost/blob/master/core/server/api/users.js#L390 `destroyByAuthor` is one of the operations we trigger to delete all the conent, see https://github.com/TryGhost/Ghost/blob/master/core/server/models/post.js#L647 The post model has a specific hook for deleting content to delete the relations as well, see https://github.com/TryGhost/Ghost/blob/master/core/server/models/post.js#L122 This hook is part of the transaction. But the `options` are ignored. `(model/*, attr, options*/)` We use the `options` to forward the transaction reference, which we need to pass into the bookshelf queries. So `return model.load('tags').call('related', 'tags').call('detach')` does not forward the transaction and that's why it stucks when deleting the content.
yo1dog
pushed a commit
to yo1dog/Ghost
that referenced
this issue
Oct 14, 2016
closes TryGhost#7137 Deleting the content from the database runs in a transaction. see https://github.com/TryGhost/Ghost/blob/master/core/server/api/users.js#L390 `destroyByAuthor` is one of the operations we trigger to delete all the conent, see https://github.com/TryGhost/Ghost/blob/master/core/server/models/post.js#L647 The post model has a specific hook for deleting content to delete the relations as well, see https://github.com/TryGhost/Ghost/blob/master/core/server/models/post.js#L122 This hook is part of the transaction. But the `options` are ignored. `(model/*, attr, options*/)` We use the `options` to forward the transaction reference, which we need to pass into the bookshelf queries. So `return model.load('tags').call('related', 'tags').call('detach')` does not forward the transaction and that's why it stucks when deleting the content.
mixonic
pushed a commit
to mixonic/Ghost
that referenced
this issue
Oct 28, 2016
closes TryGhost#7137 Deleting the content from the database runs in a transaction. see https://github.com/TryGhost/Ghost/blob/master/core/server/api/users.js#L390 `destroyByAuthor` is one of the operations we trigger to delete all the conent, see https://github.com/TryGhost/Ghost/blob/master/core/server/models/post.js#L647 The post model has a specific hook for deleting content to delete the relations as well, see https://github.com/TryGhost/Ghost/blob/master/core/server/models/post.js#L122 This hook is part of the transaction. But the `options` are ignored. `(model/*, attr, options*/)` We use the `options` to forward the transaction reference, which we need to pass into the bookshelf queries. So `return model.load('tags').call('related', 'tags').call('detach')` does not forward the transaction and that's why it stucks when deleting the content.
geekhuyang
pushed a commit
to geekhuyang/Ghost
that referenced
this issue
Nov 20, 2016
closes TryGhost#7137 Deleting the content from the database runs in a transaction. see https://github.com/TryGhost/Ghost/blob/master/core/server/api/users.js#L390 `destroyByAuthor` is one of the operations we trigger to delete all the conent, see https://github.com/TryGhost/Ghost/blob/master/core/server/models/post.js#L647 The post model has a specific hook for deleting content to delete the relations as well, see https://github.com/TryGhost/Ghost/blob/master/core/server/models/post.js#L122 This hook is part of the transaction. But the `options` are ignored. `(model/*, attr, options*/)` We use the `options` to forward the transaction reference, which we need to pass into the bookshelf queries. So `return model.load('tags').call('related', 'tags').call('detach')` does not forward the transaction and that's why it stucks when deleting the content.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
[triage] something behaving unexpectedly
server / core
Issues relating to the server or core of Ghost
Issue Summary
When attempting to delete a user who has posts I'm seeing a 500 Internal Server Error, all subsequent API requests also return a 500 error.
Steps to Reproduce
At this point I see a long spinner which eventually results in the 500 error and this message in the app log:
Any requests after this point have a similar response.
In case it's particular to my database state, here's a copy of my sqlite db
Technical details:
The text was updated successfully, but these errors were encountered: