Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-4098

Site plugins CSS can be broken in 4.0 if they use a relative URL

    XMLWordPrintable

Details

    • Bug
    • Status: Tested
    • Minor
    • Resolution: Unresolved
    • 4.0.1
    • None
    • Site add-ons
    • Hide

      This issue only needs to be tested in 1 device.

      This issue should be tested by a developer.

      Prerequisites

      • You need a site whose URL is not just the domain, e.g. MYSITE/moodle
      • You need to install a plugin with custom styles, and the URL of the styles need to be relative and start with "/". Some plugins like that are: mod_customcert, mod_attendance, qtype_regexp, qtype_kprime, qtype_pmatch.

      Test

      1. Login with any user on the site.
      2. Check that the styles are loaded, either by checking the header of the app to find the styles or opening the plugin and checking that the styles are applied.
      Show
      This issue only needs to be tested in 1 device. This issue should be tested by a developer . Prerequisites You need a site whose URL is not just the domain, e.g. MYSITE/moodle You need to install a plugin with custom styles, and the URL of the styles need to be relative and start with "/". Some plugins like that are: mod_customcert, mod_attendance, qtype_regexp, qtype_kprime, qtype_pmatch. Test Login with any user on the site. Check that the styles are loaded, either by checking the header of the app to find the styles or opening the plugin and checking that the styles are applied.
    • MOODLE_400_STABLE
    • Moodle App 4.0.2

    Description

      Example:

      Site URL: MYSITE/stable_master
      CSS: /question/mytype/styles.css

      In 3.X app the final URL was: MYSITE/stable_master/question/mytype/styles.css

      In 4.0 app the final URL is: MYSITE/question/mytype/styles.css

      This is because the URL is treated as a relative link, and links starting with "/" are added to the root of the domain. We should keep the previous behaviour to prevent breaking plugin styles.

      Attachments

        Activity

          People

            dpalou Dani Palou
            dpalou Dani Palou
            Pau Ferrer Pau Ferrer
            Dani Palou Dani Palou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: