Delete draft, user made a draft poll with a million options

Hi there, one our users was so stupid to create a poll with like a million options.
This caused the page to crash and now every time the user goes on the site and opens the draft it crashes again.
So my question is if there is any way to delete the draft, or are there any other solutions?

I tried impersonating the user but I get the same issue and I don’t really see an obvious way to delete it.

If you visit

your.site.com/my/activity/drafts

You should see an option to remove the problematic draft

4 Likes

Thnx, but this also crashes the page because the draft gets loaded for preview :sweat_smile:

I’ve tried to repro this on my developmental server and followed the steps, it worked smoothly without any errors. I think there’s a way to do this on the console. :man_shrugging:

Yeah probably, but not really sure how.
Hopefully one of the devs can point me where to look or what to look for.

Hmm strange, what version are you on?
I’m on the latest currently which is 2.3.0.beta6

I finally repro’d this issue. I can fix this issue by clicking new topic/new PM, and clicking abandon previous draft.

Awesome, where do you click the new topic though?
I only get a button to open draft. :thinking:

I can not abandon draft from there.

Here some screenshots what I see:


Ahh. It seems like PM in this situation works, but not topics.

In this situation a command in the console should do.

You can find the draft in the rails console by searching the drafts using the user id:

pry(main)> Draft.where(user_id: USER_ID)

Then once you find the right draft, you can delete it via

pry(main)> Draft.find(DRAFT_ID).destroy
11 Likes

Awesome thanks! :heart:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.