I just upgraded a forum from v 1.5.3 to 1.6.1 and post the upgrade, I am getting 500 errors on trying to view certain topics. This forum is integrated with WordPress running the WP Discourse plugin (to which I am a code contributor), and the issue seems to be specifically associated with topics that are discussions of blog posts where the first comment in the topic is a summary excerpt of the blog post.
I only see the 500 error when trying to view the “top” of the topic. In other words, if the discourse URL ends with the topic ID, I’ll get a 500 error. If it ends with a comment number after the topic ID, then it works fine.
Here is an example:
The error log is showing me this:
ActionView::Template::Error (undefined method `length' for nil:NilClass) /var/www/discourse/lib/excerpt_parser.rb:122:in `characters'
Here is the full backtrace: