legacy-knowledge-base
公開されました Sep. 5, 2025

The XML Sitemap does not include Web Content URLs from the Asset Library or the Global Site

written-by

default-service-account default-service-account

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

Issue

  • The sitemap does not include any web content created in Asset Libraries or the Global site.
  • Web contents having a Display Page template within the site are correctly included in the XML sitemap.

Environment

  • Liferay DXP 7.3, 7.4
  • Quarterly Releases

Resolution

  1. This behavior is not currently implemented and considered as a pending Feature Request: LPD-21639 - Add Global / Asset Libraries web content URLs in sitemap.xml is active 
  2. Workarounds include extending Liferay's sitemap.xml by intercepting the request and generating a custom sitemap with the repository content URLs.
  3. Alternatively, you can implement a custom extension that overrides the JournalArticleSitemapURLProvider class (or any other kind of extension):
    import com.liferay.site.provider.SitemapURLProvider;

    @Component(immediate = true,
    service = SitemapURLProvider.class,
    property = {"service.ranking:Integer=100"})
    public class SitemapTest implements SitemapURLProvider {
        ...
        @Override
        public void visitLayout(
                  Element element, String layoutUuid, LayoutSet layoutSet,
                  ThemeDisplay themeDisplay)
                  throws PortalException {
            _journalArticleSitemapURLProvider.visitLayout(element, layoutUuid, layoutSet, themeDisplay);
              // Add custom logic for repository content URLs associated with the display page.
        }
        ...
        @Reference(target = "(component.name=com.liferay.journal.internal.provider.JournalArticleSitemapURLProvider)")
      private SitemapURLProvider _journalArticleSitemapURLProvider;
    }

Additional Information

did-this-article-resolve-your-issue

legacy-knowledge-base