Project

General

Profile

Actions

Bug #66352

closed

UriBuilder calls getTargetPageTypeByFormat with wrong extension name (affects extbase formatToPageTypeMapping)

Added by Philipp Kerling about 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2015-04-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

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.

Actions #1

Updated by Gerrit Code Review about 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

Actions #2

Updated by Gerrit Code Review about 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

Actions #3

Updated by Gerrit Code Review about 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

Actions #4

Updated by Gerrit Code Review almost 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

Actions #5

Updated by Daniel Schmidt almost 9 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF