Crash in commit view : undefined method tr for NilClass
Created by: greg0ire
On one of my projects, /commits/master
gives me a 500, and the logs show the following stack trace :
Started GET "/xxx/yyyyyy/commits/master" for 78.192.188.179 at 2015-07-06 15:50:23 +0200
Processing by Projects::CommitsController#show as HTML
Parameters: {"namespace_id"=>"xxx", "project_id"=>"yyyyyy", "id"=>"master"}
Completed 500 Internal Server Error in 306ms
ActionView::Template::Error (undefined method `tr' for nil:NilClass):
1: %li.commit.js-toggle-container
2: .commit-row-title
3: %strong.str-truncated
4: = link_to_gfm commit.title, namespace_project_commit_path(project.namespace, project, commit.id), class: "commit-row-message"
5: - if commit.description?
6: %a.text-expander.js-toggle-button ...
7:
lib/gitlab/markdown/label_reference_filter.rb:91:in `label_params'
lib/gitlab/markdown/label_reference_filter.rb:52:in `block in label_link_filter'
lib/gitlab/markdown/label_reference_filter.rb:19:in `block in references_in'
lib/gitlab/markdown/label_reference_filter.rb:18:in `gsub'
lib/gitlab/markdown/label_reference_filter.rb:18:in `references_in'
lib/gitlab/markdown/label_reference_filter.rb:51:in `label_link_filter'
lib/gitlab/markdown/label_reference_filter.rb:38:in `block in call'
lib/gitlab/markdown/reference_filter.rb:76:in `block in replace_text_nodes_matching'
lib/gitlab/markdown/reference_filter.rb:70:in `replace_text_nodes_matching'
lib/gitlab/markdown/label_reference_filter.rb:37:in `call'
lib/gitlab/markdown.rb:78:in `gfm_with_options'
lib/gitlab/markdown.rb:30:in `gfm'
app/helpers/gitlab_markdown_helper.rb:22:in `link_to_gfm'
app/views/projects/commits/_commit.html.haml:4:in `_app_views_projects_commits__commit_html_haml___1039660447588257248_111936080'
app/views/projects/commits/_commits.html.haml:14:in `block in _app_views_projects_commits__commits_html_haml__4334624969923506632_112054940'
app/views/projects/commits/_commits.html.haml:4:in `each'
app/views/projects/commits/_commits.html.haml:4:in `_app_views_projects_commits__commits_html_haml__4334624969923506632_112054940'
app/views/projects/commits/show.html.haml:27:in `_app_views_projects_commits_show_html_haml__3254505351723712823_112598080'
app/controllers/projects/commits_controller.rb:18:in `show'