Bug #52527
closedExtensionManagementUtility::addToAllTCAtypes() doesn't add field because of match on substring
100%
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
Updated by Peter Niederlag over 11 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
Updated by Philipp Gampe over 11 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.
Updated by Gerrit Code Review about 11 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
Updated by Gerrit Code Review about 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/25127
Updated by Gerrit Code Review about 11 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
Updated by Gerrit Code Review almost 11 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
Updated by Gerrit Code Review almost 11 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
Updated by Tomita Militaru almost 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset a335bcfac9d96ec7c053706963dba84175e78eb1.
Updated by Gerrit Code Review over 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
Updated by Christian Kuhn over 10 years ago
- Status changed from Under Review to Resolved
Applied in changeset 30f2ba08bdf19bdf4a6106bc7a2fd66b01284dd3.