Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-137750

Aggregate filter won't aggregate CSS imported from external URLs

Details

    Description

      Steps to reproduce

      1. Add theme.css.fast.load.check.request.parameter=true to portal-ext.properties (in order to be able to use parameter css_fast_load in the url query string);
      2. Start Liferay Portal
      3. Deploy the attached classic-theme.war to Liferay Portal;
      4. Open the home page

      Expected behavior

      Most of page text is in cursive font due to the use of Allison font.

      Current behavior

      The page text remains unchanged.

      Additional remarks

      If the client sets css_fast_load=0 in the url query string (e.g. http://localhost:8080?css_fast_load=0), you will be able to see the text in cursive as expected, because the CSS won't be aggregated and the browser will be responsible to download the fonts correctly. When css_fast_load=1, the AggregatorFilter is called to aggregate the CSS content in a single file, but it ignores external urls, which makes the behavior inconsistent.

      Current workaround

      The current workaround is to download the font manually and add it to the theme source code and reference the relative path of the font using the $font-import-url variable in _clay_variables.scss.

      Attachments

        1. classic-theme.war
          3.20 MB
          Cleydyr Albuquerque
        2. screenshot-1.png
          198 kB
          Magdalena Jedraszak

        Activity

          People

            support-lep@liferay.com SE Support
            cleydyr.albuquerque Cleydyr Albuquerque (Inactive)
            Kiyoshi Lee Kiyoshi Lee
            Cleydyr Albuquerque Cleydyr Albuquerque (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              1 year, 14 weeks ago

              Packages

                Version Package
                7.1.10 DXP FP26
                7.1.10.7 SP7
                7.1.X
                7.2.10 DXP FP15
                7.2.X
                7.3.10.3 DXP SP3
                7.3.X
                7.4.13 DXP GA1
                Master