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

liferay.js and liferay.css macro doesn't add timestamp to resources

    Details

      Description

      When using liferay.js and liferay.css freemarker macros, the timestamp is not added.

      When you redeploy components or changes in those files they doesn't get refreshed if you are using a cdn.

       

      Steps to reproduce:

      Create a custom theme.

      Add this in portal-normal.vm:

       

      <@liferay.js file_name="${javascript_folder}/unav/unav72.js"/>
      <#-- Slick -->
       <#if themeDisplay??>
       <#assign
       fundraising_carousel = htmlUtil.escape(portalUtil.getStaticResourceURL(request, "${themeDisplay.getPathThemeJavaScript()}/unav/fundraising_carousel.js"))>
       
       <script src="${fundraising_carousel}" type="text/javascript"></script>
      

      Build theme.

      Add theme to a page or site.

      Expected result:

      When requesting

      unav72.js and fundraising_carousel.js

      both have a timestamp param that changes with every redeploy of the theme.

      Current result:

      fundraising_carousel.js has a timestamp param but unav72.js doesn't have it

       

      This causes that cdn's doesn't refresh some libraries when we use liferay.js or liferay.css macros.

       

      I'll attach a theme to test the issue in order to help reproducing it.

       

        Attachments

          Activity

            People

            Assignee:
            summer.zhang Summer Zhang
            Reporter:
            jorge.garcia Jorge García Jiménez
            Participants of an Issue:
            Recent user:
            Clarissa Velazquez
            Engineering Assignee:
            Jorge García Jiménez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              20 weeks ago

                Packages

                Version Package
                7.2.10 DXP FP14
                7.2.10.5 DXP SP5
                7.2.X
                7.3.7 CE GA8
                7.3.10 DXP FP2
                7.3.X
                7.4.1 CE GA2 DXP 7,4
                Master