Bug #66352
closedUriBuilder calls getTargetPageTypeByFormat with wrong extension name (affects extbase formatToPageTypeMapping)
100%
Description
With TYPO3 6.2, extbase introduced the option to map specific formats to page type numbers automatically with the view.formatToPageTypeMapping setting.
This is how the target page type number is currently determined for links in TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder:
$targetPageType = $this->extensionService->getTargetPageTypeByFormat($this->request->getControllerExtensionKey(), $this->format);
However, getTargetPageTypeByFormat in ExtensionService excepts the first parameter to be an extension name, not an extension key. This means that the mapping lookup will always fail when those two differ (which should almost always be the case).
Changing getControllerExtensionKey() to getControllerExtensionName() solves the issue for me.
As a side note, the "documentation" of this feature which I could only find at http://forge.typo3.org/attachments/download/26372/TYPO3-v6-2-whats-new.english.pdf is wrong. It says to set plugin.tx_myextension.view.formatToPageTypeMapping, but the correct location is plugin.tx_myextension.settings.view.formatToPageTypeMapping.
Updated by Gerrit Code Review over 9 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 http://review.typo3.org/38687
Updated by Gerrit Code Review over 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38687
Updated by Gerrit Code Review over 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38687
Updated by Gerrit Code Review over 9 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40454
Updated by Daniel Schmidt over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 941de0a66ce4cda0f30dc21ab2610ece6ba74c6e.