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

The wiki is defaced when trying to use a Google Fonts 2022 import in the color theme - less compilation error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 13.10.2, 14.4
    • Fix Version/s: None
    • Component/s: Flamingo Theme, LESS
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      How to reproduce:

      • customize the current theme that is used on the wiki
      • add the following code (copied from Google Fonts june 2022 version) in the advanced section of this color theme (copied from https://fonts.google.com/specimen/Fascinate ):
        @import url('https://fonts.googleapis.com/css2?family=Fascinate&display=swap');
        
      • save

      Expected result:

      • the wiki displays properly and the font is ready to use

      Actual result:

      • the wiki is defaced, no css at all is applied

      Note: this does not apply to all the imports and doesn't apply to all the imports of google fonts.
      For example, the standard Paper flamingo theme is using an import of a google font, like this:

      @import url("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700");
      

      and works perfectly fine.

      Since the 2 imports are different, I think Google Fonts may have changed their font URLs and this new code creates a specific problem to the less compiler.

      What is particularily tricky with this is that the preview of the color theme looks fine:

      so if one is not saving and viewing, they will never see the problem.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            lucaa Anca Luca
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: