Issue Bug Closed

#75946ExtensionManagementUtility won't insert fields in the right position if the position parameter is set

Thomas Schlumberger 04/27/16, 14:03 updated 10/02/18, 11:13

Description

If \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes() is being used to add custom fields to a table by using the 4th parameter
which defines the position the fields will be appended to the end of the “showitem” string nevertheless.

An example tca overrides looks like this:

$tempCols = [
    'myfield' => array(
        'label' => 'MYSUPERFIELD',
        'config' => array(
            'type' => 'input',
            'size' => '20',
            'eval' => 'trim'
        )
    ),
]

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $tempCols);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages', 'myfield', '', 'after:title');

Reviews 2