Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-50258

LESS Source Map generation produces incorrect URL.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.9.4, 3.0.1
    • 2.9
    • Themes
    • MOODLE_29_STABLE
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MDL-50258_master
    • Hide

      Use the 'human' brain to determine where the file is locally and manually open it.

      Show
      Use the 'human' brain to determine where the file is locally and manually open it.
    • Hide

      Test in both linux (or osx) and windows

      1. Using the 'Chrome' browser.
      2. Select the 'More' theme.
      3. Turn on 'theme designer mode'.
      4. Activate 'browser development tools' with the F12 key.
      5. Inspect an element of HTML and look at its styles.
      6. Pick a style that is defined in a 'less' file.
      7. Hover over the filename and click on it
      8. The file SHOULD be opened correctly (not a blank page)
      Show
      Test in both linux (or osx) and windows Using the 'Chrome' browser. Select the 'More' theme. Turn on 'theme designer mode'. Activate 'browser development tools' with the F12 key. Inspect an element of HTML and look at its styles. Pick a style that is defined in a 'less' file. Hover over the filename and click on it The file SHOULD be opened correctly (not a blank page)

      When in theme designer mode with a theme that uses the PHP LESS compiler (such as More) and you use a compatible browser (such as Chrome) the linked source files have a corrupted URL that is a mixture of the server and physical file path (using 'http' etc instead of 'file' protocol). Image attached illustrating the issue.

      I have attempted to find a solution in this forum thread: https://moodle.org/mod/forum/discuss.php?d=313061 - but did not come up with a complete solution. There is something clearly going on with the 'root' of the map needing to be the 'theme' folder itself rather than an individual theme such that themes with parents will work.

      I've only tested in M2.9 on Windows, but could affect older versions as far back as M2.7.

      The solution should be not to have the 'filename path' on the physical storage medium but rather the correct URL for the web server to access the file. However, this may cause issues with 'themedir' so a compromise needs to be made that in this case 'themedir' would not be supported in favour of flexibility in development environments.

            dmonllao David Monllaó
            gb2048 Gareth J Barnard
            Mary Evans Mary Evans
            Dan Poltawski Dan Poltawski
            cameron1729 cameron1729
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.