Project

General

Profile

Actions

Bug #70294

closed

Story #46140: Add configurable linkhandler for arbitrary records

additionalGetParameters in PageTS TCEMAIN.preview function does not work with parameter array

Added by Martin R. Krause over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend API
Target version:
Start date:
2015-10-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
easy
Is Regression:
Yes
Sprint Focus:
Stabilization Sprint

Description

The PageTS function TCEMAIN.preview allow preview link configuration for arbitrary tables (which is very cool).

Regarding to web/typo3/sysext/core/Documentation/Changelog/7.2/Feature-66370-AddFlexiblePreviewUrlConfiguration.rst the configuration

additionalGetParameters {
    tx_myext_pi1[special] = HELLO
}

should allow to set extra parameter (e.g. the controller action). This only works for parameter names without subarray (e.g. key=value), multi-dimensional parameters do not work (e.g. tx_ext_aaa[action]=show). The reason is that the TS parser eliminates all keys with "[" or "]“, the resulting TS array is empty.

Writing this parameters wit TS array, like

additionalGetParameters {
    tx_myext_pi1 {
        special = HELLO
   }
}

does not work either, because the key will become "tx_myext_pi1." with a dot.

The feature in question can fe found here: web/typo3/sysext/backend/Classes/Controller/EditDocumentController.php:743

Possible solution: Revers parameter key and values like this:

additionalGetParameters {
    tx_myext_pi1 {
         HALLO = special[subkey]
   }
}

Looks stupid, but the field to parameter mapping configuration in the same feature, that will always be written right above the additionalGetParameters configuration uses the same order. So in practice it would feel natural to the developer.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #66370: Add generic preview URL generator APIClosedMarkus Klein2015-04-10

Actions
Actions

Also available in: Atom PDF