Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-18635

The skin style is not refreshed when the color theme is modified

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Step to reproduce.

      1. Go to the main page, look at the source. The part we are interested in is:
        <link href="      /xwiki/bin/skin/skins/flamingo/style.min.css?cache-version=1617814542000&skin=XWiki.DefaultSkin&#38;colorTheme=xwiki%3AFlamingoThemes.Iceberg
          " rel="stylesheet" type="text/css" media="all" />
        
      2. Go the the "Iceberg" theme, make random change, and save the page
      3. Go back to the main page, look at the source. The part we are interested in is:
        <link href="      /xwiki/bin/skin/skins/flamingo/style.min.css?cache-version=1617814542000&skin=XWiki.DefaultSkin&#38;colorTheme=xwiki%3AFlamingoThemes.Iceberg
          " rel="stylesheet" type="text/css" media="all" />
        

      As you can see, the "cache-version" parameter (that is used to force the browser not to use a cached version of the file when a change is made) has not changed, because it only considers the "style.min.css" file, not the flamingo theme.

      As a consequence, the user cannot see the change unless she clears her browser's cache.

      To avoid this, we need to add the version of the theme into the query string, so when the theme is changed, the url is different.

      Attachments

        Issue Links

          Activity

            People

              gdelhumeau Guillaume Delhumeau
              gdelhumeau Guillaume Delhumeau
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: