Aufruf sitemap.xml führt zu Contao-Fehler
Moin Zusammen,
bisher dachte ich, dass Contao die Sitemap automatisch mit der Route https://meine-domain.de/sitemap.xml zur Verfügung stellt.
Der Aufruf https://meine-domain.de/sitemap.xml erzeugt leider einen Contao-Fehler mit Eintrag im Log.
Code:
[2026-06-21T10:06:52.176529+02:00] request.INFO: Matched route "contao_core_sitemap__invoke". {"route":"contao_core_sitemap__invoke","route_parameters":{"_route":"contao_core_sitemap__invoke","_scope":"frontend","_controller":"Contao\\CoreBundle\\Controller\\SitemapController"},"request_uri":"https://www.gewerbe-munster.de/sitemap.xml","method":"GET"} {"request_uri":"https://www.gewerbe-munster.de/sitemap.xml","request_method":"GET"}
[2026-06-21T10:06:52.514666+02:00] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\SyntaxErrorException: "An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND cc_jobs.published='1'' at line 1" at ExceptionConverter.php line 88 {"exception":"[object] (Doctrine\\DBAL\\Exception\\SyntaxErrorException(code: 1064): An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND cc_jobs.published='1'' at line 1 at /www/htdocs/w01d017a/gewerbe-munster.de/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:88)\n[previous exception] [object] (Doctrine\\DBAL\\Driver\\PDO\\Exception(code: 1064): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND cc_jobs.published='1'' at line 1 at /www/htdocs/w01d017a/gewerbe-munster.de/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:24)\n[previous exception] [object] (PDOException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND cc_jobs.published='1'' at line 1 at /www/htdocs/w01d017a/gewerbe-munster.de/vendor/doctrine/dbal/src/Driver/PDO/Connection.php:71)"} {"request_uri":"https://www.gewerbe-munster.de/sitemap.xml","request_method":"GET"}
[2026-06-21T10:06:52.565197+02:00] messenger.INFO: Stopping worker. {"transport_names":["contao_prio_high"]} {"request_uri":"https://www.gewerbe-munster.de/sitemap.xml","request_method":"GET"}
Der Aufruf https://meine-domain.de/sitemap.html funktioniert.
Wird die xml-Sitemap bei Contao 5.3 jetzt anders erzeugt, ist das nicht mehr wichtig oder hab ich irgendwas übersehen?
Contao 5.3.45
Grüße