Skip to content

Cannot delete post in admin #27

ryanprayogo opened this Issue Mar 2, 2011 · 4 comments

3 participants


Deleting post in admin (clicking the red '-' button) doesn't delete the post and the following error message is displayed:

Could not delete item, or maybe it has already been deleted

Afterwards, if I refresh the page, I am forced to re-login to admin and the post still exist.


odd, I'll look into it

oemera commented Mar 3, 2011

Hey guys, I ran into that same problem.
I digged a little bit around and found out that deleting a post is using a AJAX call to the PostController. This works fine. But it seems that there is no information about the already existing session. So what does happen is: the controller redirects us to the session#new action which can't handle JSON formats so we get an error saying there is no JSON view for this action.

I hope this helps.


ah of course, the 3.0.4 upgrade would have broken this. We need to add this code:


Send csrf-token with AJAX requests now that rails doesn't make an exception for XHR in 3.0.4.

Closed by 9a482af.

@gaelian gaelian pushed a commit that referenced this issue Apr 17, 2011
@xaviershay Send csrf-token with AJAX requests now that rails doesn't make an exc…
…eption for XHR in 3.0.4.

Fixes #27.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.