Particular user profile result in 500 error


(lid) #1

1.Go to this topic
https://meta.discourse.org/t/dns-queries-with-discourse-huge-volume/20849

2.Click on the user avatar

  1. Click on the user profile button

##result

failed resource request
5 filter is causing the issue
https://meta.discourse.org/user_actions.json?username=bchk&filter=4,5


(Jeff Atwood) #2

I think this is because you’re filtering the topic – you left some steps out of the repro.


(lid) #3

nope all steps are included

apparently you can also go directly to this user profile and get the same result
I also tried on a none logged in browser

https://meta.discourse.org/users/bchk


(cpradio) #4

I get it too in private browsing mode, so that would automatically remove any filtering too…


(Bill Ayakatubby) #5

I get the same error when I open https://meta.discourse.org/users/bchk in a new logged-in window or in a new incognito window.


(Sam Saffron) #6
 NoMethodError (undefined method `gsub' for nil:NilClass)
/var/www/discourse/lib/excerpt_parser.rb:33:in `escape_attribute'
/var/www/discourse/lib/excerpt_parser.rb:40:in `block in include_tag'
/var/www/discourse/lib/excerpt_parser.rb:40:in `map'
/var/www/discourse/lib/excerpt_parser.rb:40:in `include_tag'
/var/www/discourse/lib/excerpt_parser.rb:63:in `start_element'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/nokogiri-1.6.3.1/lib/nokogiri/html/sax/parser.rb:36:in `parse_with'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/nokogiri-1.6.3.1/lib/nokogiri/html/sax/parser.rb:36:in `parse_memory'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/nokogiri-1.6.3.1/lib/nokogiri/xml/sax/parser.rb:84:in `parse'
/var/www/discourse/lib/excerpt_parser.rb:26:in `block in get_excerpt'
/var/www/discourse/lib/excerpt_parser.rb:25:in `catch'
/var/www/discourse/lib/excerpt_parser.rb:25:in `get_excerpt'
/var/www/discourse/lib/pretty_text.rb:244:in `excerpt'
/var/www/discourse/app/serializers/user_action_serializer.rb:32:in `excerpt'

Looks like we need to monkey patch gsub handling on to nil.class

In case you are feeling all upset now … the above is a joke … it is not intended to be taken seriously


(Sam Saffron) #7

Should be fixed with

https://github.com/discourse/discourse/commit/dba1616762442af4ca48b6fd064766274c0aa477


(Sam Saffron) #8