Bug #20542
closedtypolink: addQueryString.exclude does not support arrays
0%
Description
Currently, you cannot do an exclude of an array value for addQueryString
typolink.addQueryString = 1
typolink.addQueryString.method = GET,POST
typolink.addQueryString.exclude = tt_address[name]
as addQueryString does not support arrays there. this is a problem for almost all extensions there.
The corresponding code is in typo3/sysext/cms/tslib/class.tslib_content.php:tslib_cObj->getQueryArguments (Line 5917 in trunk), that does not support array values for the exclude list.
(issue imported from #M11239)
Files
Updated by Dirk Rauscher over 15 years ago
I can confirm that problem for Typo3 Version 4.2.6
It's not possible for me to exclude parameters from my own extension
$conf['addQueryString'] = 1
$conf['addQueryString.']['exclude'] = user_myextension_pi1[pid], cHash
With that configuration only cHash is removed from the Querystring.
user_myextension_pi1[pid] is still included.
Updated by Christian Kuhn almost 15 years ago
confirmed. This is a rather nasty issue that could easily eat up tons of time while debugging.
Updated by Christian Kuhn almost 15 years ago
Added a first patch set.
The t3lib_div change adds an api method do recursivly diff two arrays, the tests show the behaviour. The tslib_content patch fixes getQueryArguments to use the method.
The content patch is only a draft and needs to be checked further, exspecially for backwards compatility and a cleanup.
Updated by Christian Kuhn almost 15 years ago
Attached a second patch set which finalizes work on getQueryArguments() and adds some test cases to this method.
Updated by Christian Kuhn over 14 years ago
- Committed 11239_03_div.diff to:
- trunk rev. 7156
- TYPO3_4-3 rev. 7157
- Committed 11239_03_content.diff to:
- trunk rev. 7158
- TYPO3_4-3 rev. 7159
- Committed 11239_03_div_testcase.diff to:
- trunk rev. 7160
- Committed 11239_03_content_testcase.diff to:
- trunk rev. 7161