Project

General

Profile

Actions

Bug #88865

closed

RecordsXmlSitemapDataProvider does not strip logical operator for additionalWhere

Added by Rémy DANIEL over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
SEO
Target version:
Start date:
2019-07-30
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
CodingNight
Complexity:
easy
Is Regression:
Sprint Focus:

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

Actions

Also available in: Atom PDF