Bug #76031
closedgetPageOverlay Hook does not loop through pages by reference
100%
Description
With the introduction of getPagesOverlay the page array is looped to pass each page to the getPageOverlay_preProcess hook:
foreach ($pagesInput as $origPage) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPageOverlay'] as $classRef) { $hookObject = GeneralUtility::getUserObj($classRef); if (!$hookObject instanceof PageRepositoryGetPageOverlayHookInterface) { throw new \UnexpectedValueException('$hookObject must implement interface ' . PageRepositoryGetPageOverlayHookInterface::class, 1269878881); } $hookObject->getPageOverlay_preProcess($origPage, $lUid, $this); } }
However, as the foreach loop doesn't use & before $origPage modified values in getPageOverlay_preProcess will never make it back to the original page array.
Updated by Gerrit Code Review over 8 years ago
- Status changed from New to Under Review
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/47996
Updated by Nicole Cordes over 8 years ago
Going back to one commit before the changes to getPageOverlay() were made (commit hash 030e067) shows there wasn't any possibility to change the page before.
Updated by Nicole Cordes over 8 years ago
- Sprint Focus set to On Location Sprint
Updated by Gerrit Code Review over 8 years ago
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/47996
Updated by Andreas Allacher over 8 years ago
The issue was introduced with #64258
because that adds a foreach loop between the page array and the hook object.
Updated by Gerrit Code Review over 8 years 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/47996
Updated by Andreas Allacher over 8 years ago
Maybe someone from the core team could modify the is regression setting?
Updated by Gerrit Code Review over 8 years 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/47996
Updated by Gerrit Code Review over 8 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48479
Updated by Anonymous over 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 526576f7ede240ff4ec264660d3c22054f01a8f4.