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

Error "Tag XML needed in sitemap" if the site does not have pages with sitemap active

    Details

      Description

      When sitemap has only a empty urlset it gives validation errors.
      https://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd

      Steps to reproduce:

      1. Create a site;
      2. Create 2 pages;
      3. Disable sitemap on each page;
      4. look for the sitemap preview;

      Expected Results:
      No XML should be generareted.

      Actual Results:
      The portal generate a XML as follow:

      <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"/>

      Reproduced on 6.2.x:
      Commit da7ba9014fa6ba030ede86f2cd944ad00fd83df5 - Thu Jun 7 13:36:10 2018 +0200
      Reproduced on 7.0.x: (must test the individual page sitemap.xml)
      Commit: 0b500a9d3b0f3f401d0c40edb6fa372f0e8dfcb2
      Base Branch Commit: 7014765d298eebacb143b2ddf15237b964591639
      Updated on: Thu Jun 7 22:01:25 2018 -0700*
      Reproduced on Master: (must test the individual page sitemap.xml)
      Commit: 56fa1da59ae4e78db17dbe0749a5ccb02826928f
      Updated on: Fri Jun 8 13:55:48 2018 -0700

        Attachments

          Activity

            People

            Assignee:
            beck.liu Beck Liu
            Reporter:
            lino.alves Lino Alves
            Participants of an Issue:
            Recent user:
            Csaba Turcsan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 30 weeks, 6 days ago

                Packages

                Version Package
                7.0.0 DXP FP52
                7.0.0 DXP SP9
                7.0.X
                7.1.10 DXP FP1
                7.1.X
                Master