Project

General

Profile

Actions

Bug #88101

closed

f:uri.action (and f:link.action)’s argumentsToBeExcludedFromQueryString argument mis-handles comma (,) in argument names

Added by Sven-S. Porst over 5 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2019-04-07
Due date:
% Done:

0%

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

Description

f:uri.action’s argumentsToBeExcludedFromQueryString argument should remove existing parameters. This does not work reliably when the paramter name contains a , (comma).

Example template:

<p>
Include this in a template, view its page. Then
add these parameters to the URI in the browser:
&a[foo][x]=1&a[foo][y]=1&a[foo,bar][x]=1&a[foo,bar][y]=1
</p>

<p>
<f:uri.action
addQueryString="TRUE"
argumentsToBeExcludedFromQueryString="{0:'a[foo][x]'}"
noCacheHash="1"
/>
– should remove a[foo] only: works as expected
</p>

<p>
<f:uri.action
addQueryString="TRUE"
argumentsToBeExcludedFromQueryString="{0:'a[foo,bar][x]'}"
noCacheHash="1"
/>
– should remove a[foo,bar][x] only: does not work as expected
</p>

<p>
<f:uri.action
addQueryString="TRUE"
argumentsToBeExcludedFromQueryString="{0:'a[foo%2Cbar][x]'}"
noCacheHash="1"
/>
– removes a[foo,bar][x] only
</p>

Looking at the code suggests that, internally, TYPO3 explodes/implodes this parameter using , as the separator, which looks like it could be the cause of this issue.

Seen in TYPO3 9.5.5 as well as TYPO3 8.7.

Actions

Also available in: Atom PDF