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

The sitemap.xml is not being returned using valid URLs

    Details

      Description

      The sitemap.xml is not being returned using valid URLs. Currently the logic uses getVirtualHost(host), which throws an exception if the virtual host entered does not exist in the database. It would be better to use fetchVirtualHost(host) and return null and defer to the default virtual host so that the sitemap.xml still displays as expected for valid sitemap.xml URLs rather than throwing an exception.

      Steps to Reproduce:

      1. Start portal and navigate to localhost:8080/sitemap.xml. The sitemap.xml displays as expected.
      2. Navigate to 127.0.0.1:8080/sitemap.xml. An error occurs on the page.
      3. Get your IP address and navigate to [IP_Address]:8080/sitemap.xml. An error occurs on the page.

      Expected Results: The sitemap.xml should display on valid URLs (such as 127.0.0.1:8080/sitemap.xml or [IP_Address]:8080/sitemap.xml).
      Actual Results: The sitemap.xml does not display on all valid URLs.

        Attachments

        1. fixed.png
          fixed.png
          26 kB
        2. reproduced.png
          reproduced.png
          25 kB
        3. validURL1.jpg
          validURL1.jpg
          113 kB
        4. validURL2.jpg
          validURL2.jpg
          113 kB

          Issue Links

            Activity

              People

              Assignee:
              hong.zhao Hong Zhao (Inactive)
              Reporter:
              dustin.ryerson Dustin Ryerson (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 45 weeks, 3 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.1 CE GA2