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

Sitemap does not contain old pages after upgrade from 7.0.

    Details

      Description

      Reproduction Steps:

      1.) Use a vanilla Liferay 7.0 with the latest fix pack.

      2.) Start the system and create a new site and set a virtualhost to the it (please add this to your hosts file as well).

      3.) Create a few pages and please check your virtualhost:8080/site/sitemap.xml

      Result: You should see all the sites that you created in your site.

      4.) Shutdown your system and make an upgrade to Liferay 7.2 (fix pack dxp-8).

      5.) When the upgrade is finished start the system and check your virtualhost:8080/site/sitemap.xml.

      Result: You won’t see any page entries. If you create a new layout with Liferay 7.2 then that will be part of the sitemap.xml.

      I don’t know the root cause of the this, however, if I am not mistaking the uuid-es of the pages change during the upgrade and this might be one of the reasons.

      Also tested:

      7.2x @ commit (d352872096f3ddcb5cf652bf31ed897e24b2cbb1) reproduced

      master @ commit (7f0d8da3d86724c398c4c31f4eee40287fb1f066) reproduced

      Expected result: You can see all previously created pages and the new one in the sitemap.xml.
      Actual result: Only the new page is referenced in the sitemap.xml.

      Notes:

      • The query for layouts is created and ran in LayoutLocalServiceImpl.getAllLayouts(..).
      • This query has a filter condition like "classNameId != 12345".
      • The main difference between upgraded and newly created Layout records is that classNameId is null for the upgraded ones, while the new one has 0.
      • A most likely solution can be to create an upgrade step that fills classNameId columns with 0.
      • Another solution is to extend the filter condition to include "... OR classNameId IS NULL". However, that would probably affect the query performance as well.

        Attachments

          Activity

            People

            Assignee:
            yang.cao Yang Cao
            Reporter:
            vendel.toreki Vendel Töreki
            Participants of an Issue:
            Recent user:
            Yunlin "Steven" Sun
            Engineering Assignee:
            Istvan Dezsi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

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

                Packages

                Version Package
                7.2.10 DXP FP11
                7.2.10.3 DXP SP4
                7.2.X
                7.3.X
                7.3.10 DXP FP1
                7.3.10.1 DXP SP1
                7.3.6 CE GA7
                Master