500 error when going through revision history


(Kramer Campbell) #1

When I changed the category on a particular topic, I noticed two revision history entries were added to the post. When I went to review the history, going back to the first entry resulting in being in a state where it is stuck loading and a 500 error was logged in the developer console.

This happened on Discourse 1.1.0.beta2 fbf86c4e2e7890f9a26f905b2a77a535b1af05f3.

NoMethodError (undefined method `post=' for nil:NilClass)

/var/www/discourse/app/controllers/posts_controller.rb:303:in `find_post_revision_from_params'
/var/www/discourse/app/controllers/posts_controller.rb:216:in `revisions'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.5/lib/action_controller/metal/implicit_render.rb:4:in `send_action'

REQUEST_URI: /posts/429/revisions/3.json?_=1410490979156

(Jeff Atwood) #2

Can you repro on try.discourse.org?


(Kramer Campbell) #3

I am unable to repro it on try.discourse.org and I have noticed other admins and moderators have previously changed categories on our forum and this issue did not occur. However, this issue occurred right after I made a category change myself and I am uncertain of what variables that would cause this to happen.

@Riking believes there’s a code problem as somehow bad data got into the database.


(Kane York) #4

Not quite - I said it’s one or both of those. But yes.


(Jens Maier) #5

Are these related?


(Kramer Campbell) #6

Ah, yes they are. My apologizes, I was unable to find that topic with bits from the stack trace I posted or with other search criteria I tried earlier.


(Sam Saffron) #7