Project

General

Profile

Actions

Bug #20542

closed

typolink: addQueryString.exclude does not support arrays

Added by Benni Mack over 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2009-06-02
Due date:
% Done:

0%

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

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

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.

Actions #2

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.

Actions #3

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.

Actions #4

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.

Actions #5

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
Actions

Also available in: Atom PDF