Bug #70294
closedStory #46140: Add configurable linkhandler for arbitrary records
additionalGetParameters in PageTS TCEMAIN.preview function does not work with parameter array
100%
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.