Bug #88865

RecordsXmlSitemapDataProvider does not strip logical operator for additionalWhere

Added by DANIEL Rémy 4 months ago. Updated 3 months ago.

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

100%

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

Associated revisions

Revision 0f8fcd74 (diff)
Added by DANIEL Rémy 3 months ago

[BUGFIX] Strip logical operator prefix in config.additionalWhere

When building the additionalWhere clause in the
RecordsXmlSitemapDataProvider, a possible `AND` operator
must be removed. Doctrine's queryBuilder adds this prefix
automatically.

Resolves: #88865
Releases: master,9.5
Change-Id: I6fd1f170c1c3a3b46bcaab4f2a9589e98e489a79
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61392
Tested-by: TYPO3com <>
Tested-by: Richard Haeser <>
Tested-by: Tymoteusz Motylewski <>
Reviewed-by: Richard Haeser <>
Reviewed-by: Tymoteusz Motylewski <>

Revision 09993103 (diff)
Added by Tymoteusz Motylewski 3 months ago

[BUGFIX] Strip logical operator prefix in config.additionalWhere

When building the additionalWhere clause in the
RecordsXmlSitemapDataProvider, a possible `AND` operator
must be removed. Doctrine's queryBuilder adds this prefix
automatically.

Resolves: #88865
Releases: master,9.5
Change-Id: I6fd1f170c1c3a3b46bcaab4f2a9589e98e489a79
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61612
Tested-by: TYPO3com <>
Tested-by: Richard Haeser <>
Reviewed-by: Richard Haeser <>

History

#1 Updated by Gerrit Code Review 4 months ago

  • Status changed from New to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61392

#2 Updated by DANIEL Rémy 4 months ago

  • Assignee set to DANIEL Rémy

#3 Updated by Susanne Moog 4 months ago

  • Tags set to CodingNight

#4 Updated by Susanne Moog 4 months ago

  • Target version set to next-patchlevel

#5 Updated by Gerrit Code Review 4 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61392

#6 Updated by Gerrit Code Review 4 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61392

#7 Updated by Gerrit Code Review 4 months ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61392

#8 Updated by Gerrit Code Review 4 months ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61523

#9 Updated by Gerrit Code Review 4 months ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61392

#10 Updated by DANIEL Rémy 3 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#11 Updated by Gerrit Code Review 3 months ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61612

#12 Updated by Gerrit Code Review 3 months ago

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61612

#13 Updated by Gerrit Code Review 3 months ago

Patch set 3 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61612

#14 Updated by Tymoteusz Motylewski 3 months ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF