Bug #65666
closedtypolink, typolinkEnableLinksAcrossDomains and forceAbsoluteUrl strips absRefPrefix
100%
Description
Environment¶
- no realurl
- config.typolinkEnableLinksAcrossDomains= 1
- config.absRefPrefix = /site/
Reproduce¶
use this TypoScript snippet:
link = TEXT link.typolink { parameter = 66 forceAbsoluteUrl = 1 additionalParams = &tx_ext_pi1[controller]=Controller returnLast = url }
The expected result would be:
http://dev/site/index.php?id=66&tx_ext_pi1%5Bcontroller%5D=Controller
The actual result is:
http://dev/index.php?id=66&tx_ext_pi1%5Bcontroller%5D=Controller
Solution¶
In the typolink() function there is a wrong assumption about the content of $targetDomain.
If we have domain here it means we link across domains...
If forceAbsoluteUrl is set $targetDomain will contain the current domain.
A check for this case needs to be added.
Updated by Gerrit Code Review over 9 years ago
- Status changed from Accepted 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/37730
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/37733
Updated by Markus Klein over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 6fc033d7b71e5817e789e218c0c9149364f935d0.