Feature #99323
closedPSR-14 Event for manipulating records in ContentContentObject.php->render()
100%
Description
Due to our use of `mod.web_layout.allowInconsistentLanguageHandling = 1` we encountered an issue that the sorting of the content elements in the front-end differs from the sorting in the backend.
Since we use strict mode incombination with allowing non-connected content elements in languages the sortings fails since it is always based on the sorting of the default language.
We fixed this in V10 by introducing a PSR-14 Event with-in a XClass.
Since `allowInconsistentLanguageHandling` is not officially supported by the core we do not expect a bugfix.
That is why we would like to introduce a PSR-14 Event in the render function like this.
So we can use the event to re-sort the elements with an asort.
......
do {
$records = $this->cObj->getRecords($conf['table'], $conf['select.']);
// START: THIS WAS CHANGED IN THE XCLASS IN THIS FUNCTION
$eventDispatcher = GeneralUtility::makeInstance(EventDispatcher::class);
$event = $eventDispatcher->dispatch(
new ModifyRecordsAfterFetchingContentEvent($records, $conf)
);
$records = $event->getRecords();
// END: THIS WAS CHANGED IN THE XCLASS IN THIS FUNCTION
$cobjValue = '';
if (!empty($records)) {
$this->getTimeTracker()->setTSlogMessage('NUMROWS: ' . count($records));
......
I will provide a PR in the following days.
Updated by Gerrit Code Review almost 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77274
Updated by Gerrit Code Review almost 2 years ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77274
Updated by Gerrit Code Review almost 2 years ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77274
Updated by Gerrit Code Review almost 2 years ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77274
Updated by Gerrit Code Review almost 2 years ago
Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77274
Updated by Gerrit Code Review over 1 year ago
Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77274
Updated by Gerrit Code Review over 1 year ago
Patch set 9 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77274
Updated by Benni Mack over 1 year ago
- Target version changed from 12 LTS to Candidate for Major Version
Updated by Gerrit Code Review 11 months ago
Patch set 10 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77274
Updated by Gerrit Code Review 10 months ago
Patch set 11 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77274
Updated by Gerrit Code Review 10 months ago
Patch set 12 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77274
Updated by Gerrit Code Review 10 months ago
Patch set 13 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77274
Updated by Gerrit Code Review 10 months ago
Patch set 14 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77274
Updated by Joey Bouten 10 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 6a6a7fb4f97ea5803f9f21de6b98ae0330b24995.
Updated by Chris Müller 10 months ago
- Related to Task #102850: Fix FQCN in changelog for ModifyRecordsAfterFetchingContentEvent added