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

Web Contents displayed via API from a theme template are not using the cached data

    Details

      Description

      After the LPS-45558 the cache does not apply to web content displayed directly in a theme template via the journalContent API, impacting directly in the performance.

      In this scenario only a themeDisplay object can be provided to the API

      This is an example of the affected code having a theme with the setting footer-articleId:

      <#assign 
         journalContent = serviceLocator.findService("com.liferay.journal.util.JournalContent") 
         articleId = getterUtil.getString(theme_settings["footer-articleId"])
         articleGroupId = themeDisplay.getScopeGroupId()
      />
      
      <#if validator.isNotNull(articleId)>
         ${journalContent.getContent(articleGroupId , articleId, "VIEW", locale, themeDisplay)}
      </#if>
      

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brian.chan Brian Chan
                Reporter:
                jose.jimenez Jose Jimenez
                Participants of an Issue:
                Recent user:
                Clarissa Velazquez
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  19 weeks ago

                  Packages

                  Version Package
                  7.0.0 DXP FP78
                  7.0.10.11 DXP SP11
                  7.0.X
                  7.1.10 DXP FP10
                  7.1.10.2 SP2
                  7.1.3 CE GA4
                  7.1.X
                  Master