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

Fragment Usage Page incorrectly categorizes all usages under Pages



      There is a "Usages and Propagation" page that can be used to see where a given Fragment is used. This page categorizes the different usages by what type of page they are used on - for instance, a "Page", a "Page Template", or a "Display Page Template".

      In 7.2.x and earlier, however, this categorization isn't working. Everything is categorizes as being under a Page even if it is actually being used on a Page Template or a Display Page Template.

      The reason for this miscategorization is because query to count and get the entries from the FragmentEntryLink table for "Page Template" and "Display Page Template" mistakenly assumes that the classNameId of those FragmentEntryLink entries will correspond to the LayoutPageTemplateEntry class. However, this is a faulty assumption. We always store the Layout classNameId in the FragmentEntryLink table regardless of what type of page this FragmentEntryLink is associated with.

      In 7.3.x and later, this issue is fixed by LPS-115162, which adds a new plid column to the FragmentEntryLink table and adds new queries that join this new column with the relevant fields in the LayoutPageTemplateEntry table to find the FragmentEntryLinks that are associated with that particular type of page/template.

      We cannot backport the entirety of LPS-115162 since it adds a new column to the database. However, we can partially backport the relevant queries, making only slight modifications to them to use the existing classPK column rather than the new plid column, since the classPK column is always functioning as a plid in 7.2.x.

      Steps to Reproduce
      1. Start up Liferay and log in as the admin user.
      2. Navigate to Site Administration > Pages > Page Fragments and create a new Collection.
      3. In the new collection, create a new component.
      4. Add the following html code to the component:

            Hello World

      5. Navigate to Site Builder > Pages > Display Page Templates and add a new template (any content type will work)
      6. Add the test component to the template and publish
      7. Navigate back to Page Fragments, click on the three button menu on the test component, and select View Usages
      Expected Result: The usages of the fragment are categorized under "Display Page Template"
      Actual Result: The usages of the fragment are categorized under "Page"


          Issue Links



              jayda.wu Jayda Wu
              michael.bowerman Michael Bowerman
              Participants of an Issue:
              Recent user:
              Clarissa Velazquez
              Engineering Assignee:
              Michael Bowerman
              0 Vote for this issue
              0 Start watching this issue


                Days since last comment:
                46 weeks, 2 days ago


                  Version Package
                  7.2.10 DXP FP15