Project

General

Profile

Actions

Bug #84925

closed

config.forceTypeValue does not work as PageLinkBuilder defaults to 0 if no pagetype parameter is set

Added by Andreas Allacher almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Frontend
Target version:
Start date:
2018-05-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In PageLinkBuilder there is the following code:

$pageType = $linkDetails['pagetype'] ?? 0;

This $pageType parameter is then used as typeOverride for this link which has precedence over config.forceTypeValue
However, in case of it not being set config.forceTypeValue should be used.

I think the easiest solution would be to default to en empty string as that is the default value for linkData or in 9.x createTotalUrlAndLinkData also.

Actions #1

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

Actions #2

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

Actions #3

Updated by Andreas Allacher almost 6 years ago

Example:
The following TypoScript setup:

config.forceTypeValue = 10
page = PAGE
page.10 = TEXT
page.10.value = Click
page.10.typelink.parameter = 1

testTypeNum = PAGE
testTypeNum.typeNum = 10
testTypeNum.10 = TEXt
testTypeNum.10.value = SUCCESS

should result in the generated link pointing to:
/index.php?id=1&type=10

However, the current behvaviour completely ignores forceTypeValue and just points to /index.php?id=1

Actions #4

Updated by Tymoteusz Motylewski almost 6 years ago

thanks for the config, little typo
page.10.typelink.parameter = 1

should be
page.10.typolink.parameter = 1

Actions #5

Updated by Anonymous almost 6 years ago

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

Updated by Gerrit Code Review almost 6 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56961

Actions #7

Updated by Anonymous almost 6 years ago

  • Status changed from Under Review to Resolved
Actions #8

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF