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

Web Content Template cache is avoiding the correct rendering of Liferay Taglibs

    Details

      Description

      Steps to reproduce:

      1. Create a Structure.
      2. Add a Template to this Structure.
      3. Edit the Template and add the following script:

      master / 7.1.x
      ==============
      
      <#assign viewURL = renderResponse.createRenderURL() />
      
      ${viewURL.setParameter("mvcPath", "/view_template.jsp")}
      
      <div class="text-right">
          <@liferay_social_bookmarks["bookmarks"]
              className="com.liferay.dynamic.data.mapping.model.DDMStructure"
              classPK=[ADD TEMPLATE'S CLASSPK, AVAILABLE ON COLUMN CLASSPK OF DATABASE TABLE DDMTemplate]
              displayStyle="menu"
              target="_blank"
              title=layout.getName(locale)
              url=viewURL.toString()
           />
      </div>
      
      7.0.x
      =====
      
      <div class="text-right">
           <@liferay_ui["social-bookmarks"]
               displayStyle="menu"
               target="_blank"
               title=layout.getName(locale) 
               url=viewURL
           />
      </div>
      

      4. Create a Web Content based on the Structure added previously.
      5. Go to the Welcome page and add an Asset Publisher.
      6. In the Asset Publisher, click on the title of the rendered Web Content.

      Expected result:

      The social bookmarks added to the Template should be rendered (see Master Expected behavior.mov).

      Actual result:

      The social bookmarks added to the Template aren't rendered correctly (see Master Actual behavior.mov).

      Note: the rendered content of Liferay Taglibs (in this case, the social bookmarks) should not be cached to avoid incorrect display of Web Contents, as the one described in the Actual Result section. However, by default, all Templates are cached and this default behavior associated to the Liferay Taglibs is the root cause of this issue. Therefore, a warning message will be added to prevent the user enable the cache when Liferay Taglibs are being used by the Template.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                9 weeks, 6 days ago

                Packages

                Version Package
                Master