Bug #67230
closedLabels not displayed for group relations in pi_base extensions
0%
Description
https://review.typo3.org/35483 introduced a regression in 6.2.12
For fields of type "group", with "internal_type" = 'db' the labels aren't shown if only 'allowed' property is used to define the table for which the MM relation is made.
The new code assumes that 'foreign_table' is set, which is marked as "just a workaround for an extbase limitation" in TCA reference. Pi_base extension don't use that field and rely on the 'allowed' field to define the remote table. The old code worked fine for pi_base extensions, but apparently not for extbase extensions; with the new code this situation is the other way around.
Updated by Jigal van Hemert over 9 years ago
- Target version set to 6.2.13
- Sprint Focus set to Stabilization Sprint
Updated by Markus Klein over 9 years ago
Can you post a sample TCA?
https://review.typo3.org/#/c/35483/4/typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php
Already contains such a testcase, right?
$GLOBALS['TCA'] = array( 'index_config' => array( 'columns' => array( 'indexcfgs' => array( 'config' => array( 'type' => 'group', 'internal_type' => 'db', 'allowed' => 'index_config,pages', 'size' => 5, ), ), ), ), );
Updated by Jigal van Hemert over 9 years ago
Anonymized TCA:
'category' => array( 'exclude' => 1, 'label' => 'LLL:EXT:extkey/locallang_db.xml:tx_extkey.category', 'config' => array( 'type' => 'group', 'internal_type' => 'db', 'allowed' => 'tx_extkey_cat', 'size' => 5, 'minitems' => 0, 'maxitems' => 100, 'MM' => "tx_extkey_category_mm", ) ),
adding a line 'foreign_table' => 'tx_extkey_cat', makes the category labels appear in the List module.
The new unit test doesn't have an 'MM' property set. Without 'MM' a different block of code is used which looks in $theColConf['allowed'].
If you look at the new code it explicitly uses $theColConf['foreign_table'] to get the name of the linked table, whereas the old code used $theColConf['allowed'].
allowed can contain a list of tables or '*' as a wildcard, so it is rather complicated to handle them exactly list the 'foreign_table' property of a 'select' field.
Looking at the differences and the definitions in TCAref. I suspect that the previous bugfix was done for extbase extensions since extbase uses 'foreign_table' to find the table name for a 'group' field.
We could easily copy 'allowed' to 'foreign_table' if the latter is empty, but for 'group' fields the options to have multiple foreign tables or a '*' wildcard must still be supported.
Updated by Markus Klein over 9 years ago
- Status changed from New to Accepted
- Priority changed from Should have to Must have
- Complexity set to medium
Ok thanks, got that.
We have to add a unit test for this case and the 'allowed' and '*' has to be supported, I fully agree.
Updated by Alexander Opitz over 9 years ago
- Target version changed from 6.2.13 to 6.2.14
Updated by Alexander Opitz over 9 years ago
- Target version changed from 6.2.14 to 6.2.15
Updated by Alexander Opitz about 9 years ago
- Target version changed from 6.2.15 to 6.2.16
Updated by Markus Klein almost 9 years ago
- Target version changed from 6.2.16 to Candidate for patchlevel
Updated by Oliver Hader almost 4 years ago
- Status changed from Accepted to Needs Feedback
- Is Regression changed from Yes to No
No activity for five years, removing regression flag.
Is this still a topic for TYPO3 v10?
Updated by Oliver Hader almost 4 years ago
- Tags set to pending-close
- Sprint Focus deleted (
Stabilization Sprint)
Updated by Christian Kuhn about 3 years ago
- Status changed from Needs Feedback to Closed
Closing due to lack of feeback.