Issue Bug Closed

#88865RecordsXmlSitemapDataProvider does not strip logical operator for additionalWhere

Rémy DANIEL 07/30/19, 17:50 updated 12/23/19, 22:45

Description

RecordsXmlSitemapDataProvider does not strip logical operator for additionalWhere, but PagesXmlSitemapDataProvider does it.

The documentation of RecordsXmlSitemapDataProvider config.additionalWhere shows a AND logical operator, but this will leads to an invalid SQL query like this:

... AND (AND (no_index = 0 OR no_follow = 0)) ...

To prevent this, \TYPO3\CMS\Core\Database\Query\QueryHelper::stripLogicalOperatorPrefix() should be used on config.additionalWhere.

[1] https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/XmlSitemap/Index.html#xmlsitemapdataproviders

Reviews 2