No search result in project wiki with default branch <> master
Summary
When you set a Default Branch different than master
in a Project, the Search function for this one no longer returns results for Wikis
Environment
Version : GitLab Core 11.1.4
System : Debian 9
Steps to reproduce
On GitLab Core :
- Create an Internal project
- Setup a repository with a README.
- Create a branch
test
- Create a Wiki page with "Hello World" content
- Set project Default Branch from
master
totest
- In the Search box, search for "Hello"
What is the current bug behavior?
No search result in project wiki with Default Branch different than master
What is the expected correct behavior?
Wiki search results should not be dependent of the project Default Branch.
Relevant logs and/or screenshots
In the production.log
:
Started GET "/search/autocomplete?project_id=21&project_ref=&term=hello" for xxx.xxx.xxx.xxx at 2018-08-22 11:32:51 +0200
Processing by SearchController#autocomplete as JSON
Parameters: {"project_id"=>"21", "project_ref"=>"", "term"=>"hello"}
Completed 200 OK in 24ms (Views: 0.1ms | ActiveRecord: 4.1ms)
Started GET "/search?utf8=%E2%9C%93&search=hello&group_id=&project_id=21&search_code=true&repository_ref=" for xxx.xxx.xxx.xxx at 2018-08-22 11:32:51 +0200
Processing by SearchController#show as HTML
Parameters: {"utf8"=>"✓", "search"=>"hello", "group_id"=>"", "project_id"=>"21", "search_code"=>"true", "repository_ref"=>""}
Completed 200 OK in 973ms (Views: 83.5ms | ActiveRecord: 15.6ms)
Edited by Florent Yu