Wiki search doesn't work with project repository disabled
### Summary The search finds wiki pages (there `Wiki (8)`) but it still displays: `We couldn't find any wiki results matching ...` If I change my search term it finds other results `Wiki (52)` but it still displays: `We couldn't find any wiki results matching ...` ### Steps to reproduce The problem only happens if the Repository features are disabled in the project settings. Unfortunately I can only reproduce it locally Following some more information: I always get back the following result for: search/count?project_id=121&repository_ref=master&scope=issues&search=test&snippets= ``` {"count":"0"} ``` The browser shows me that it gets a 304, json cached ### What is the current *bug* behavior? Search results are not displayed, only the count. ### What is the expected *correct* behavior? Search results are displayed, and match the count. ### Relevant logs and/or screenshots ![gitlab-search](/uploads/cab800ca548365a03e23ded1bde47edd/gitlab-search.gif) ### Output of checks #### Results of GitLab environment info <details> <summary>Expand for output related to GitLab environment info</summary> <pre> (For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`) </pre> </details> #### Results of GitLab application Check <details> <summary>Expand for output related to the GitLab application check</summary> <pre> (For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:check SANITIZE=true`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true`) (we will only investigate if the tests are passing) </pre> </details> ### Possible fixes (If you can, link to the line of code that might be responsible for the problem)
issue