Updating a category topic fails with the message «NoMethodError (undefined method `inner_html' for nil:NilClass)» when the topic's contents starts with a GitHub onebox

AI-generated summary

A bug is reported where updating a category topic fails with a NoMethodError when the topic’s contents start with a GitHub onebox. The error occurs in the update_category_description method in post_revisor.rb and is accompanied by a stack trace. However, codinghorror states that this is an unsupported use case and will not be fixed, as category definitions require actual text, not oneboxes.

Step 1

Step 2

The log entry:

NoMethodError (undefined method inner_html' for nil:NilClass) lib/post_revisor.rb:445:in update_category_description’

Stack trace:

lib/post_revisor.rb:445:in `update_category_description'
lib/post_revisor.rb:428:in `revise_topic'
lib/post_revisor.rb:163:in `block in revise!'
vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/transactions.rb:220:in `transaction'
lib/post_revisor.rb:151:in `revise!'
app/controllers/posts_controller.rb:194:in `update'	

3 Mi Piace

This is unsupported and will not be “fixed”. The category definition needs actual text, not a onebox.