SitemapListener check for empty article missing
OMOSde opened this issue · 1 comments
OMOSde commented
I encountered this problem when I called the URL domain.tld/sitemap.xml
.
There seems to be a check missing in src/EventListener/Contao/SiteMapListener:L55
that checks if there are any content elements in the article.
Workaround for line 55: if ($objContent && 'module' === $objContent->type && false === $objContent->invisible) {
Question: $objContent
returns a collection with potentially several content elements. Shouldn't a for loop be added here so that the check for module
can take effect at all?
Contao 5.3.9 (PHP 8.3)
christianbarkowsky commented
Done @OMOSde