Bug #20542
closed
typolink: addQueryString.exclude does not support arrays
Added by Benni Mack over 15 years ago.
Updated over 14 years ago.
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
11239_01_content.diff (1.72 KB)
11239_01_content.diff |
|
Administrator Admin, 2009-12-16 19:52
|
|
11239_01_div.diff (1.13 KB)
11239_01_div.diff |
|
Administrator Admin, 2009-12-16 19:52
|
|
11239_01_div_testcase.diff (2.53 KB)
11239_01_div_testcase.diff |
|
Administrator Admin, 2009-12-16 19:52
|
|
11239_02_content.diff (3.49 KB)
11239_02_content.diff |
|
Administrator Admin, 2009-12-27 22:00
|
|
11239_02_div_testcase.diff (2.53 KB)
11239_02_div_testcase.diff |
|
Administrator Admin, 2009-12-27 22:01
|
|
11239_02_div.diff (1.13 KB)
11239_02_div.diff |
|
Administrator Admin, 2009-12-27 22:01
|
|
11239_02_content_testcase.diff (6.99 KB)
11239_02_content_testcase.diff |
|
Administrator Admin, 2009-12-27 22:01
|
|
11239_03_content.diff (3.59 KB)
11239_03_content.diff |
|
Administrator Admin, 2010-03-25 00:26
|
|
11239_03_content_testcase.diff (6.96 KB)
11239_03_content_testcase.diff |
|
Administrator Admin, 2010-03-25 00:26
|
|
11239_03_div.diff (1.14 KB)
11239_03_div.diff |
|
Administrator Admin, 2010-03-25 00:27
|
|
11239_03_div_testcase.diff (2.58 KB)
11239_03_div_testcase.diff |
|
Administrator Admin, 2010-03-25 00:27
|
|
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.
confirmed. This is a rather nasty issue that could easily eat up tons of time while debugging.
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.
Attached a second patch set which finalizes work on getQueryArguments() and adds some test cases to this method.
- 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
Also available in: Atom
PDF