plenta / contao-jobs-basic-bundle

Contao Job Manager
https://plenta.io/contao-erweiterungen/jobs-basic
GNU Lesser General Public License v3.0
23 stars 7 forks source link

SitemapListener check for empty article missing #140

Closed OMOSde closed 4 months ago

OMOSde commented 5 months ago

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)

image

christianbarkowsky commented 4 months ago

Done @OMOSde