Bug #84925
closedconfig.forceTypeValue does not work as PageLinkBuilder defaults to 0 if no pagetype parameter is set
100%
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.
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Andreas Allacher over 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
Updated by Tymoteusz Motylewski over 6 years ago
thanks for the config, little typo
page.10.typelink.parameter = 1
should be
page.10.typolink.parameter = 1
Updated by Anonymous over 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1ab8bcf453b1c062c914ee9c79db2fd61717f5ab.
Updated by Gerrit Code Review over 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
Updated by Anonymous over 6 years ago
- Status changed from Under Review to Resolved
Applied in changeset 375cabb91582c3cfc9189f059eebe9f7c67463b3.