Bug #38496
closed
Redirect of a shortcut does not take all URL parameters into account
Added by Helmut Hummel over 12 years ago.
Updated about 7 years ago.
Sprint Focus:
On Location Sprint
Description
Currently when a page is a shortcut, TYPO3 redirects to the page the shortcut points to.
But only configured linkVars and the type parameter are taken into account for generating the target link.
Any additional parameter that is appended to the URL of a shortcut page is discarded.
The solution is to just forward every GET parameter to the target page.
- Target version changed from 6.0.0-alpha3 to 6.0.1
- Target version changed from 6.0.1 to next-patchlevel
- Is Regression set to No
- Assignee set to Susanne Moog
Susanne, we were talking yesterday about this issue. I am not able to patch it properly :(
Looking at this code under typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php file (lines from 3008 to 3012):
$type = GeneralUtility::_GET('type');
if ($type && MathUtility::canBeInterpretedAsInteger($type)) {
$parameter .= ',' . $type;
}
$redirectUrl = $cObj->typoLink_URL(array('parameter' => $parameter));
I would replace for something like this:
$arguments = GeneralUtility::_GET();
unset($arguments['id']);
if (count($arguments)) {
foreach ($arguments as $argument) {
$parameter .= ',' . $argument;
}
}
But as far as I can see, this is later used inside typolink function, that is a bit tricky.
Could you take a look?
imho it would be enough to add the config option "addQueryString" to the typolink call
- Target version deleted (
next-patchlevel)
- Target version set to 8.4
- Sprint Focus set to On Location Sprint
I am working on this one.
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
This fix is still not present in current v7 LTS branch!
Hi Susanne,
thanks for the info. I wasn't aware of this being a breaking change...
I have patched my core version accordingly, didn't seem to have any negative side-effects.
- Status changed from Resolved to Closed
Also available in: Atom
PDF