Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • 12-9-stable
  • 12-7-stable
  • 12-6-stable
  • 12-8-stable
  • github/fork/Kloppi313/patch-1
  • 12-5-stable
  • 12-4-stable
  • github/fork/ramalokesh8477/master
  • 12-1-stable
  • 12-2-stable
  • 12-0-stable
  • 12-3-stable
  • 42-42-stable
  • github/fork/hussamgit398/patch-2
  • 12-3-auto-deploy-20190911
  • 12-3-auto-deploy-20190916
  • 12-3-auto-deploy-20190908
  • 12-3-auto-deploy-20190901
  • 12-3-auto-deploy-20190901-32664
  • v12.10.0.pre
  • v12.9.0
  • v12.9.0-rc42
  • v12.8.7
  • v12.8.6
  • v12.8.5
  • v12.8.4
  • v12.8.3
  • v12.6.8
  • v12.7.7
  • v12.8.2
  • v12.8.1
  • v12.9.0.pre
  • v12.8.0
  • v12.8.0-rc42
  • v12.5.10
  • v12.7.6
  • v12.6.7
  • v12.7.5
  • v12.5.9
40 results

CHANGELOG

  • Dmitriy Zaporozhets's avatar
    c75ac821
    Merge branch 'fix-error-500-global-search-issues' into 'master' · c75ac821
    Dmitriy Zaporozhets authored
    Fix Error 500 when doing a search in dashboard before visiting any project
    
    If a search turned up an issue, under certain conditions you would see this error:
    
    ```
    ActionView::Template::Error (undefined method `path_with_namespace' for nil:NilClass):
         6:   - if issue.description.present?
         7:     .description.term
         8:       = preserve do
         9:         = search_md_sanitize(markdown(issue.description))
        10:   %span.light
        11:     #{issue.project.name_with_namespace}
        12:   - if issue.closed?
      lib/gitlab/markdown/upload_link_filter.rb:36:in `build_url'
      lib/gitlab/markdown/upload_link_filter.rb:31:in `process_link_attr'
      lib/gitlab/markdown/upload_link_filter.rb:18:in `block in call'
      lib/gitlab/markdown/upload_link_filter.rb:17:in `call'
      lib/gitlab/markdown.rb:127:in `gfm'
      lib/gitlab/markdown.rb:24:in `render'
      app/helpers/gitlab_markdown_helper.rb:61:in `markdown'
      app/views/search/results/_issue.html.haml:9:in `block in _app_views_search_results__issue_html_haml__4127460390996300432_59973760'
      app/views/search/results/_issue.html.haml:8:in `_app_views_search_results__issue_html_haml__4127460390996300432_59973760'
      app/views/search/_results.html.haml:20:in `_app_views_search__results_html_haml__589475855773452465_61761440'
      app/views/search/show.html.haml:5:in `_app_views_search_show_html_haml___1852335078065998536_69780120'
    ```
    
    Confirmed this is issue still happens in GitLab 8.4, and it also happens on GitLab.com. Here's how to reproduce:
    
    1. Login in a new browser.
    2. Enter a search term on the top right that will land a hit in the "Issues" (e.g. GitLab).
    3. Click on "Issues" tab. You should get an Error 500.
    
    The issue is that @Project isn't assigned to anything.
    
    See merge request !2110
    c75ac821
    History
    Merge branch 'fix-error-500-global-search-issues' into 'master'
    Dmitriy Zaporozhets authored
    Fix Error 500 when doing a search in dashboard before visiting any project
    
    If a search turned up an issue, under certain conditions you would see this error:
    
    ```
    ActionView::Template::Error (undefined method `path_with_namespace' for nil:NilClass):
         6:   - if issue.description.present?
         7:     .description.term
         8:       = preserve do
         9:         = search_md_sanitize(markdown(issue.description))
        10:   %span.light
        11:     #{issue.project.name_with_namespace}
        12:   - if issue.closed?
      lib/gitlab/markdown/upload_link_filter.rb:36:in `build_url'
      lib/gitlab/markdown/upload_link_filter.rb:31:in `process_link_attr'
      lib/gitlab/markdown/upload_link_filter.rb:18:in `block in call'
      lib/gitlab/markdown/upload_link_filter.rb:17:in `call'
      lib/gitlab/markdown.rb:127:in `gfm'
      lib/gitlab/markdown.rb:24:in `render'
      app/helpers/gitlab_markdown_helper.rb:61:in `markdown'
      app/views/search/results/_issue.html.haml:9:in `block in _app_views_search_results__issue_html_haml__4127460390996300432_59973760'
      app/views/search/results/_issue.html.haml:8:in `_app_views_search_results__issue_html_haml__4127460390996300432_59973760'
      app/views/search/_results.html.haml:20:in `_app_views_search__results_html_haml__589475855773452465_61761440'
      app/views/search/show.html.haml:5:in `_app_views_search_show_html_haml___1852335078065998536_69780120'
    ```
    
    Confirmed this is issue still happens in GitLab 8.4, and it also happens on GitLab.com. Here's how to reproduce:
    
    1. Login in a new browser.
    2. Enter a search term on the top right that will land a hit in the "Issues" (e.g. GitLab).
    3. Click on "Issues" tab. You should get an Error 500.
    
    The issue is that @Project isn't assigned to anything.
    
    See merge request !2110
To find the state of this project's repository at the time of any of these versions, check out the tags.