Project

General

Profile

Actions

Bug #92527

closed

f:link.typolink does not respect additionalParams

Added by Chris no-lastname-given over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-10-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The `additionalParams` parameter in the `typolink` viewhelper is not respected.

Using the example from the [documentation](https://docs.typo3.org/other/typo3/view-helper-reference/10.4/en-us/typo3/fluid/latest/Link/Typolink.html) it returns the following link:

<f:link.typolink parameter="{link}" additionalParams="&u=b" 
    target="_blank" 
    class="ico-class" title="some title" 
    additionalAttributes="{type:'button'}" 
    useCacheHash="true" 
>
   Linktext
</f:link.typolink>

This translates to

<a href="myfile.doc" title="some title" target="_blank" class="ico-class" type="button">Linktext</a>

The `u=b` is not added to the link.

Debugging the variable `$typoLinkParameter` in the viewhelper (line 130) retuns

file:1414 _blank ico-class "some title" &u=b
Actions #1

Updated by Riccardo De Contardi about 3 years ago

  • Status changed from New to Needs Feedback

I am looking at https://stackoverflow.com/questions/57558916/fluid-typolink-viewhelper-ignores-additionalparams-attribute)

and I wonder if the documentation is correct...

could you try with:

additionalParams="{name: 'value'}" 

Id est:

<f:link.typolink parameter="{link}" additionalParams="{u:'b'}" 
    target="_blank" 
    class="ico-class" title="some title" 
    additionalAttributes="{type:'button'}" 
    useCacheHash="true" 
>
   Linktext
</f:link.typolink>
Actions #2

Updated by Chris no-lastname-given about 3 years ago

In the meantime, this issue seems to be fixed. With TYPO3 10.4.14 it is all working, like described in the documentation. So the following is right:

additionalParams="&u=b" 

This issue can be closed.

Actions #3

Updated by Chris no-lastname-given about 3 years ago

One additional note:

If you link to a file (parameter="t3://file?uid=8"), the "additionalParams" is not respected, but I guess, this is expected behaviour.

Actions #4

Updated by Riccardo De Contardi about 3 years ago

  • Status changed from Needs Feedback to Closed

@Chris no-lastname-given thank you for your findings

Closing the issue.

Actions

Also available in: Atom PDF