Bug #79936

PAGE_TSCONFIG_ID not substituted correctly in wizard_list module

Added by Kevin Ditscheid over 2 years ago. Updated about 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2017-02-21
Due date:
% Done:

0%

TYPO3 Version:
7
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I got an issue with the list wizard. When using ###PAGE_TSCONFIG_ID### as the pid-parameter, the resulting pid will always be 0, because the code in the ListController::main fetches a TSconfig array with dots appended to the fieldname array keys, but checks for the fieldname array key without the dot.
To reproduce this, simply add a field to TCA with the following wizards config:

'wizards' => [
    'list' => array(
            'type' => 'script',
            'title' => '',
            'icon' => 'actions-system-list-open',
            'params' => array(
                    'table' => 'sys_category',
                    'pid' => '###PAGE_TSCONFIG_ID###'
            ),
            'module' => array(
                    'name' => 'wizard_list'
            )
    )
]

I added this wizard to the sys_file_metadata and added pageTS for it like so:
TCEFORM.sys_file_metadata.categories.PAGE_TSCONFIG_ID = 38

TSconfig will result in:
array(
  'sys_file_metadata' => array(
    'categories.' => array(
      'PAGETSCONFIG_ID' => 38
    )
  )
)

Given field parameter will be:
$this->P['field'] = 'categories'

But the check for the pid is done with the following code:
$this->pid = (int)$TSconfig[$this->P['field']][$keyword];

History

#1 Updated by Oliver Hader about 2 years ago

  • Category changed from DataHandler aka TCEmain to FormEngine aka TCEforms

Also available in: Atom PDF