Project

General

Profile

Actions

Bug #52527

closed

ExtensionManagementUtility::addToAllTCAtypes() doesn't add field because of match on substring

Added by Peter Niederlag over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-10-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

If you have a field 'great_categories' you can't add another field on the same table with addToAllTCAtypes() with a name of 'categories' as this field is considerd existing in the routine. this is most likely happening due to the use of

strpos($typeDetails['showitem'], $str) !== FALSE
Actions #1

Updated by Peter Niederlag over 10 years ago

$tmpField1 = array (
    'fancy_field_test' => array(
        'exclude' => 0,
        'label' => 'first working test',
        'config' => array(
            'type' => 'input',
            'size' => 30,
            'eval' => 'trim,required'
        )
    )
);
$tmpField2 = array (
    'test' => array(
        'exclude' => 0,
        'label' => 'second (failing) test',
        'config' => array(
            'type' => 'input',
            'size' => 30,
            'eval' => 'trim,required'
        )
    )
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $tmpField1);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCATypes('pages', 'fancy_field_test');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages',$tmpField2);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCATypes('pages', 'test');

tmpField2 won't show up :(
'test' is part of 'fancy_field_test'
reversing the registration order would fix it

Actions #2

Updated by Philipp Gampe over 10 years ago

  • Status changed from New to Accepted
  • Priority changed from Should have to Must have
  • TYPO3 Version changed from 6.2 to 6.0
  • Complexity set to medium

Should go to all 6.x versions I guess (and maybe even to 4.5).

Can you work on a patch (and put the example into a unit test)? This would be great.

Actions #3

Updated by Gerrit Code Review over 10 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/25127

Actions #4

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/25127

Actions #5

Updated by Gerrit Code Review over 10 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25127

Actions #6

Updated by Gerrit Code Review about 10 years ago

Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27663

Actions #7

Updated by Gerrit Code Review about 10 years ago

Patch set 1 for branch TYPO3_6-0 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27671

Actions #8

Updated by Tomita Militaru about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #9

Updated by Gerrit Code Review almost 10 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29874

Actions #10

Updated by Christian Kuhn almost 10 years ago

  • Status changed from Under Review to Resolved
Actions #11

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF