Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #4074

Closed
Open
Created May 25, 2013 by Administrator@rootOwner

Unknown lexer kills dashboard

Created by: Razer6

Steps to reproduce

Caution: Don't do this on a production environment

  1. Create an issue
  2. Make a comment with following content:
```cs
int i = 42;
```

Observed behavior

  1. The comment doesn't appear
  2. Adding a new comment is disabled
  3. The Dashboard is completely dead

Logs

ActionView::Template::Error (Traceback (most recent call last):
File "/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/gitlab-pygments.rb-0.3.2/lib/pygments/mentos.py", line 303, in start
res = self.get_data(method, lexer, args, kwargs, text)
File "/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/gitlab-pygments.rb-0.3.2/lib/pygments/mentos.py", line 171, in get_data
res = self.highlight_text(text, lexer, formatter_name, args, _convert_keys(opts))
File "/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/gitlab-pygments.rb-0.3.2/lib/pygments/mentos.py", line 122, in highlight_text
lexer = self.return_lexer(lexer, args, kwargs, code)
File "/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/gitlab-pygments.rb-0.3.2/lib/pygments/mentos.py", line 79, in return_lexer
return lexers.get_lexer_by_name(lexer, **inputs)
File "/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/gitlab-pygments.rb-0.3.2/vendor/pygments-main/pygments/lexers/__init__.py", line 80, in get_lexer_by_name
raise ClassNotFound('no lexer for alias %r found' % _alias)
ClassNotFound: no lexer for alias 'cs' found
):
24: .event-note
25: .md
26: %i.icon-comment-alt.event-note-icon
27: = sanitize(markdown(truncate(event.target.note, length: 150)), tags: %w(a img b pre p))
28: - note = event.target
29: - if note.attachment.url
30: = link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do
lib/redcarpet/render/gitlab_html.rb:25:in `block_code'
app/helpers/gitlab_markdown_helper.rb:50:in `render'
app/helpers/gitlab_markdown_helper.rb:50:in `markdown'
app/views/events/event/_note.html.haml:27:in `_app_views_events_event__note_html_haml__4205488875053872416_72109040'
app/views/events/_event.html.haml:13:in `block in _app_views_events__event_html_haml__1544104189975596176_64171140'
app/views/events/_event.html.haml:6:in `_app_views_events__event_html_haml__1544104189975596176_64171140'
app/views/dashboard/show.js.haml:2:in `_app_views_dashboard_show_js_haml___3579448431996277681_60291000'
app/controllers/dashboard_controller.rb:20:in `show'

Running on d58aca06

Assignee
Assign to
Time tracking