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

Closed
Open
Created Aug 15, 2014 by Administrator@rootOwner

GitLab - Getting 404 (Not Found) for /assets/ace/mode-markdown.js

Created by: geordee

Getting the following error from GitLab while editing the code online.

GET http://git.server.local/assets/ace/mode-markdown.js 404 (Not Found) application-c8cd2dd87cbf8a023b21baf4d6996ac9.js:26
    t.loadScript application-c8cd2dd87cbf8a023b21baf4d6996ac9.js:26
    t.loadModule application-c8cd2dd87cbf8a023b21baf4d6996ac9.js:26
    setMode application-c8cd2dd87cbf8a023b21baf4d6996ac9.js:27
    (anonymous function)

It seems the asset is requested by the following Javascript that gets inline with the code.

Probably introduced in this commit https://github.com/gitlabhq/gitlabhq/commit/1794f606bd74ae775cd10a3f7da293fb67134c1c

# gitlab-ce.git/app/views/projects/edit_tree/show.html.haml

:javascript
  ace.config.set("modePath", gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}/ace")
  var ace_mode = "#{@blob.language.try(:ace_mode)}";
  var editor = ace.edit("editor");
  editor.setValue("#{escape_javascript(@blob.data)}");
  if (ace_mode) {
    editor.getSession().setMode('ace/mode/' + ace_mode);
  }

I wonder whether the inline Javascript knows anything about Rails asset management, and whether it is assuming that the file would be there in assets folder without hash and all.

Assignee
Assign to
Time tracking