Project

General

Profile

Actions

Bug #67230

closed

Labels not displayed for group relations in pi_base extensions

Added by Jigal van Hemert over 9 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend User Interface
Start date:
2015-06-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
pending-close
Complexity:
medium
Is Regression:
No
Sprint Focus:

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #52126: Readable output for type "group" and using mm tables is wrongClosedGeorg Ringer2013-09-19

Actions
Related to TYPO3 Core - Bug #57129: Related group db record title does not resolve correctlyClosed2014-03-21

Actions
Actions #1

Updated by Jigal van Hemert over 9 years ago

  • Target version set to 6.2.13
  • Sprint Focus set to Stabilization Sprint
Actions #2

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,
                ),
            ),
        ),
    ),
);
Actions #3

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.

Actions #4

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.

Actions #5

Updated by Alexander Opitz over 9 years ago

  • Target version changed from 6.2.13 to 6.2.14
Actions #6

Updated by Alexander Opitz over 9 years ago

  • Target version changed from 6.2.14 to 6.2.15
Actions #7

Updated by Alexander Opitz about 9 years ago

  • Target version changed from 6.2.15 to 6.2.16
Actions #8

Updated by Markus Klein almost 9 years ago

  • Target version changed from 6.2.16 to Candidate for patchlevel
Actions #9

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?

Actions #10

Updated by Oliver Hader almost 4 years ago

  • Tags set to pending-close
  • Sprint Focus deleted (Stabilization Sprint)
Actions #11

Updated by Christian Kuhn about 3 years ago

  • Status changed from Needs Feedback to Closed

Closing due to lack of feeback.

Actions

Also available in: Atom PDF