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
  • #1933

Closed
Open
Created Nov 06, 2012 by Administrator@rootOwner

Server Error 500 in Wiki if lexer not found

Created by: Philzen

Just copied some example JSON into a gitlab wiki, preceding it by:

```Javascript

After saving it (which production.log tells me went OK), trying to display the wiki entry is futile always giving error 500. The log traceback is as follows:

ActionView::Template::Error (Traceback (most recent call last):
  File "/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/pygments.rb-0.3.1/lib/pygments/mentos.py", line 303, in start
    res = self.get_data(method, lexer, args, kwargs, text)
  File "/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/pygments.rb-0.3.1/lib/pygments/mentos.py", line 171, in get_data
    res = self.highlight_text(text, lexer, formatter_name, args, _convert_keys(opts))
  File "/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/pygments.rb-0.3.1/lib/pygments/mentos.py", line 122, in highlight_text
    lexer = self.return_lexer(lexer, args, kwargs, code)
  File "/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/pygments.rb-0.3.1/lib/pygments/mentos.py", line 79, in return_lexer
    return lexers.get_lexer_by_name(lexer, **inputs)
  File "/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/pygments.rb-0.3.1/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 'Javascript' found
):
    13: .file_holder
    14:   .file_content.wiki
    15:     = preserve do
    16:       = markdown @wiki.content
    17: 
    18: %p.time Last edited by #{@wiki.user.name}, #{time_ago_in_words @wiki.created_at} ago
    19: - if can? current_user, :admin_wiki, @project
  lib/redcarpet/render/gitlab_html.rb:14:in `block_code'
  app/helpers/gitlab_markdown_helper.rb:44:in `render'
  app/helpers/gitlab_markdown_helper.rb:44:in `markdown'
  app/views/wikis/show.html.haml:16:in `block in _app_views_wikis_show_html_haml__2973566385151022826_36987160'
  app/views/wikis/show.html.haml:15:in `_app_views_wikis_show_html_haml__2973566385151022826_36987160'
  app/controllers/wikis_controller.rb:20:in `show'

Running gitlab 3.0.3 on a gentoo server. All Gems are up-to-date.

Assignee
Assign to
Time tracking