[5.4] Code search error 500
Created by: vemod
I know reporting issue with 5.4 but 6.0 is too "unstable"to me to upgrade. So here is the problem:
Searched "DbUnit" in a project and got error 500.
Output from all logs:
Started GET "/search?utf8=%E2%9C%93&search=DbUnit&group_id=&project_id=42&search_code=true&repository_ref=" for 127.0.0.1 at 2013-08-30 13:56:39 +0200
Processing by SearchController#show as HTML
Parameters: {"utf8"=>"✓", "search"=>"DbUnit", "group_id"=>"", "project_id"=>"42", "search_code"=>"true", "repository_ref"=>""}
Completed 500 Internal Server Error in 12ms
NoMethodError (undefined method `empty_repo?' for nil:NilClass):
app/contexts/search_context.rb:20:in `execute'
app/controllers/search_controller.rb:17:in `show'
Started GET "/static.css" for 127.0.0.1 at 2013-08-30 13:56:39 +0200
Processing by ProjectsController#show as HTML
Parameters: {"id"=>"static.css"}
Rendered public/404.html (0.1ms)
Filter chain halted as :project rendered or redirected
Completed 404 Not Found in 4ms (Views: 0.8ms | ActiveRecord: 0.2ms)
Started GET "/favicon.ico" for 127.0.0.1 at 2013-08-30 13:56:39 +0200
Processing by ProjectsController#show as */*
Parameters: {"id"=>"favicon.ico"}
Rendered public/404.html (0.0ms)
Filter chain halted as :project rendered or redirected
Completed 404 Not Found in 4ms (Views: 0.5ms | ActiveRecord: 0.2ms)
Suspect failure point:
- Code search works in other projects. I am member, master etc..
- Code search fails in a project where I am not member of any kind but can access it via url (I am admin user). Can browse files, see commits etc.. but cannot search in the project.