Project

General

Profile

Actions

Bug #62277

open

TCA > Config > type group - foreign_table necessary for extbase to work

Added by Mats Nygaard over 9 years ago. Updated about 5 years ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2014-10-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Having the following TCA for an object:

'config' => array(
    'type' => 'group',
    'internal_type' => 'db',
    'allowed' => 'pages',
    'MM' => 'tx_tcteaser_mm',
    'MM_insert_fields' => array('tablename' => 'tx_tcteaser_domain_model_teaser'),
    'MM_match_fields' => array('tablename' => 'tx_tcteaser_domain_model_teaser'),
    'size' => 10,
    'minitems' => 0,
    'maxitems' => 9999,
),

it works fine in the backend. However, in the frontend, using extbase, all repository calls, ie. findAll(), generates an error, where lastBuiltQuery is this:

SELECT .* FROM tx_tcteaser_mm LEFT JOIN ON tx_tcteaser_mm.uid_foreign = .uid WHERE (tx_tcteaser_mm.uid_local = 1 AND tx_tcteaser_mm.tablename = 'tx_tcteaser_domain_model_teaser') ORDER BY tx_tcteaser_mm.sorting ASC

As you can see, the foreign table is not known.

By adding foreign_table (in this case 'pages') to the config, the error disappears, and everything is fine.

But - foreign_table is not mentioned in the documentation for "group" at all.

Should foreign_table be added OR is this an axtbase bug?


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Task #6249: Support for TCA fields of type "group" - allowes DAM support (has patch)Closed2010-01-27

Actions
Actions #1

Updated by Mats Nygaard over 9 years ago

Additionally, the documentation for group > mm (http://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Group/Index.html#mm) mentions a required table field "tablenames". This won't work for me, but renaming the field to "tablename" seems to do the job. Actually, "tablename" is mentioned on the same page, here: http://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Group/Index.html#columns-group-data-mm

Again, documentation glitch or code glitch?

Actions #2

Updated by Riccardo De Contardi over 8 years ago

Extbase expects "foreign_table" to contain exactly one table name compared to "allowed" which can hold a list of table names.
(see http://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Group/Index.html#columns-group-properties-foreign-table)
this limitation is still present in Extbase and will be handled in the future; the documentation about it already got an opened issue (see https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-TCA/pull/36)

Actions #3

Updated by Mathias Schreiber over 8 years ago

  • Target version deleted (next-patchlevel)
Actions #4

Updated by Susanne Moog about 5 years ago

  • Has duplicate Task #6249: Support for TCA fields of type "group" - allowes DAM support (has patch) added
Actions

Also available in: Atom PDF