Bug #45175
closedf:link.page addQueryString="1" doesnt work properly
0%
Description
Im trying to generate a "to top" link like in the example in the wiki
<f:link.page addQueryString="1" section="#top">To Top</f:link.page>
But this will always generate a link where the uid of the page is given twice:
index.php?id=469&id=469&
Version 4.7.7
Updated by Alexander Opitz almost 10 years ago
- Status changed from New to Needs Feedback
Hi,
was this issue fixed or does it still exists?
Updated by Riccardo De Contardi over 9 years ago
it is still present in 6.2.6; a workaround could be:
<f:link.page addQueryString="1" section="top" argumentsToBeExcludedFromQueryString="{1:'id'}">
Updated by Alexander Opitz over 9 years ago
- Project changed from 2559 to TYPO3 Core
- Category changed from Fluid: ViewHelpers to Fluid
- Status changed from Needs Feedback to New
- TYPO3 Version set to 6.2
- Is Regression set to No
Updated by Alfred Bez over 9 years ago
I have the following code:
<f:link.page pageUid="101" addQueryString="1">linktext</f:link.page>
Example Page-URL (current page):
http://www.domain.com/index.php?id=23&L=1
Expected Result (link-href):
http://www.domain.com/index.php?id=101&L=1
My Result (link-href):
http://www.domain.com/index.php?id=101
Updated by Riccardo De Contardi about 9 years ago
I've recently found that an easy way to obtain the same thing is simply writing:
<a href='#top'>To Top</a>
with simple quotes instead of double quotes :)
Updated by Claus Due almost 9 years ago
Just a tiny update from the side lines: this issue has been reviewed, judging if it has any impact on or is affected by the merging of the standalone Fluid package as TYPO3 dependency.
Verdict: NOT AFFECTED. However... this looks suspiciously like unexpected behavior due to input arguments - the ViewHelper itself will merely forward to typoLink which will apply absRefPrefix among others. And specially when rendering section links: You can't judge this from which URL you end up on. You have to inspect the actual link tag to see the URL; if it, which I suspect it does, lacks the pageUid argument you may want to add it to force the ViewHelper to render a full page link without trying to resolve any target page UID and so pass an explicit "id" parameter to typoLink via the ViewHelper. Hope it helps :)
Updated by Claus Due over 8 years ago
- Status changed from New to Closed
Will close this one: three workarounds recorded, typoLink connection explained, no feedback for 10 months - assuming required info was found in typoLink docs or one of the workarounds have been used.
If that is not correct please ask for this issue to be reopened!