Project

General

Profile

Actions

Bug #45175

closed

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

Added by Christopher Seidel about 11 years ago. Updated over 8 years ago.

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

0%

Estimated time:
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 1 (0 open1 closed)

Related to TYPO3 Core - Bug #71695: toTop Link reloads pageClosed2015-11-19

Actions
Actions #1

Updated by Alexander Opitz over 9 years ago

  • Status changed from New to Needs Feedback

Hi,

was this issue fixed or does it still exists?

Actions #2

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'}">
Actions #3

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
Actions #4

Updated by Alfred Bez about 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

Actions #5

Updated by Riccardo De Contardi almost 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 :)
Actions #6

Updated by Claus Due over 8 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 :)

Actions #7

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!

Actions

Also available in: Atom PDF