Bug #45175

f:link.page addQueryString="1" doesnt work properly

Added by Christopher Seidel over 6 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2013-02-01
Due date:
% Done:

0%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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


Related issues

Related to TYPO3 Core - Bug #71695: toTop Link reloads page Closed 2015-11-19

History

#1 Updated by Alexander Opitz about 5 years ago

  • Status changed from New to Needs Feedback

Hi,

was this issue fixed or does it still exists?

#2 Updated by Riccardo De Contardi almost 5 years ago

it is still present in 6.2.6; a workaround could be:

<f:link.page addQueryString="1" section="top" argumentsToBeExcludedFromQueryString="{1:'id'}">

#3 Updated by Alexander Opitz almost 5 years ago

  • Project changed from Fluid 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

#4 Updated by Alfred Bez over 4 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

#5 Updated by Riccardo De Contardi over 4 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 :)

#6 Updated by Claus Due almost 4 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 :)

#7 Updated by Claus Due over 3 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!

Also available in: Atom PDF