Task #6249

Support for TCA fields of type "group" - allowes DAM support (has patch)

Added by Franz Koch over 10 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2010-01-27
Due date:
% Done:

70%

TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Hi, extbase currently doesn't support TCA fields of type "group" natively. A easy workaround currently is to additionally define a "foreign_table" in your columns configuration together with a MM relation of course (no comma separated lists).

But unfortunately this little trick doesn't work together with DAM relations and probably some other multicolumn relations, because DAM itself is not configuring all MM_match_fields (tablenames missing by default) and is letting TYPO3 do the job of filling in the correct 'tablenames' match fields in MM relations. This patch is a first attempt to do in extbase the same as TYPO3 does in the backend. So with this patch you get:

- native support of group fields (type: group, interal_type: db, allowed: onlyOneTableNameSoFar)
- handling of multi-table relations like the CORE of TYPO3 does (adding tablenames if needed)

With this patch applied, DAM relations will work by default.

What will not work:
Retrieving/persisting objects to multiple tables for a single db field (so more then one allowed relation table, like the RECORDS CType of TYPO3 is using). To support this, some major rework is needed I think, that should/could be done together with singleTableInheritance.

extbase-SupportForTcaFieldType-Group.diff View (9.33 KB) Franz Koch, 2010-01-27 15:18

extbase-SupportForTcaFieldType-Group_v2.diff View (10.9 KB) Franz Koch, 2010-01-27 23:32

Issue_6249_TcaGroupSupport.diff View (18.1 KB) Franz Koch, 2011-01-21 17:09


Related issues

Related to TYPO3 Core - Bug #48568: Relation table match fields not respected for relation tables New 2013-05-27
Duplicates TYPO3 Core - Bug #62277: TCA > Config > type group - foreign_table necessary for extbase to work New 2014-10-16

History

#1 Updated by Martin Kutschker over 10 years ago

The issue is related to #6232 and #6233 as methods changed in these issues are also changed with this.

#2 Updated by Franz Koch over 10 years ago

version 2 of the patch, adding enhanced compatibility for group fields and incorporating the changes (drop of the check for 'foreign_label') from #6232 - so with this patch #6232 is obsolete.
Patch #6233 should still apply correctly.

#3 Updated by Franz Koch about 10 years ago

ok - the patch won't apply anymore due to recent changes in extbase. I already merged the changes in my local svn version, but still need to extract a clean patch for this, whithout all my other adoptions ;) So a new patch is upcomming.

#4 Updated by Jochen Rau about 10 years ago

  • Assignee set to Jochen Rau
  • Priority changed from Must have to Should have
  • Target version changed from Extbase 1.1.0 to Extbase 1.2.0beta2

#5 Updated by Jochen Rau about 10 years ago

  • Status changed from New to Accepted

#6 Updated by Jochen Rau about 10 years ago

  • Target version changed from Extbase 1.2.0beta2 to Extbase 1.3.0beta1

#7 Updated by Sebastian Kurfuerst over 9 years ago

  • Tracker changed from Feature to Story
  • Target version changed from Extbase 1.3.0beta1 to Extbase 1.3.0

any updates here? That's definitely an important one.

#8 Updated by Jochen Rau over 9 years ago

  • Assignee deleted (Jochen Rau)
  • Priority changed from Should have to Must have

Sorry, no updates here. Due to the fact that this is a feature, it can't go into 1.3 anymore.

#9 Updated by Jochen Rau over 9 years ago

  • Target version deleted (Extbase 1.3.0)
  • translation missing: en.field_position deleted (5882)
  • translation missing: en.field_position set to 5727

#10 Updated by Jochen Rau over 9 years ago

  • Tracker changed from Story to Bug
  • Parent task set to #10797

#11 Updated by Sebastian Kurfuerst over 9 years ago

  • Target version changed from Extbase 1.3.0RC1 to Extbase 1.3.0

not possible to be included in 1.3.0RC1 anymore, that's why I move them to 1.3.0 for now.

#12 Updated by Sebastian Kurfuerst over 9 years ago

moving issues to 1.3.0, as they will not be fixed in RC1 anymore.

#13 Updated by Franz Koch over 9 years ago

Here is a new patch that adds support for TCA fields of type "group". The patch passed some basic tests (only read request so far) on a current website of mine, but it's still missing unit tests (I'm not yet familiar with them). The patch also needs some further testing:
  • test for correct behavior when adding/removing MM relations
  • tests with MM_opposite_field configurations in read and write processes.

This patch still doesn't add support for multiTable relations, but is already providing the basics. The "only" thing missing is to find a way on how to map the objects correctly - writing should already work correctly (MM-relation wise).

#14 Updated by Franz Koch over 9 years ago

  • Status changed from Accepted to Under Review

#15 Updated by Franz Koch over 9 years ago

  • Target version changed from Extbase 1.3.0 to Extbase 1.4
  • % Done changed from 80 to 70

I did some further tests and noticed some remaining issues that have to be addressed in order to get full group field support. The patch itself seems to work (besides of one bug I found), but extbase is missing other features that have to be implemented first in order to have it work correctly (like relation type BELONGS_TO_MANY as far as I have seen). So it won't make it into 1.3.0 - sorry.

#16 Updated by Sebastian Kurfuerst about 9 years ago

  • Category set to Extbase: MVC
  • Has patch set to Yes

#17 Updated by Sebastian Kurfuerst about 9 years ago

  • Parent task deleted (#10797)

#18 Updated by Thomas Deinhamer about 8 years ago

Updates on this? Is it still relevant?

#19 Updated by Lorenz Ulrich almost 8 years ago

Does this have a relation with http://bugs.typo3.org/view.php?id=16956 ?

#20 Updated by Markus Günther almost 8 years ago

Is this still relevant or could we close the issue?

#21 Updated by Markus Günther almost 8 years ago

  • Status changed from Under Review to Needs Feedback

#22 Updated by Thomas Deinhamer almost 8 years ago

As far as I have experienced in a recent project
this does not work yet, so in my oppinion this is
still a relevant feature request.

So, not sure how up to date the patch is. I guess
it won't work with the current git master.

Furthermore there are some other
tickets related to the group field:
http://forge.typo3.org/issues/32549
http://forge.typo3.org/issues/23980

#23 Updated by Franz Koch almost 8 years ago

yes, having a look at current codebase this is still missing.

#24 Updated by Markus Günther almost 8 years ago

  • Status changed from Needs Feedback to Accepted

Ok i create a list for me with issues like that and will have a look at this.

#25 Updated by Helmut Hummel over 7 years ago

  • Status changed from Accepted to Needs Feedback

Franz Koch wrote:

yes, having a look at current codebase this is still missing.

Can you please add a full TCA configuration of what is not yet supported in extbase?

#26 Updated by Franz Koch over 7 years ago

AFAIK currently users still have to define a "foreign_table" in TCA in order to support fields of type "group". Also some special cases of the group type are not treated correctly. See attached patch v2 which should still be valid. It's unfortunately almost 3 years ago that I had this issue and debugged this issue for several hours.

#27 Updated by Alexander Schnitzler about 7 years ago

  • Target version changed from Extbase 1.4 to Extbase 6.2

#28 Updated by Anja Leichsenring about 7 years ago

  • Target version changed from Extbase 6.2 to Extbase 6.3

#29 Updated by Alexander Opitz over 5 years ago

  • Project changed from Extbase MVC Framework to TYPO3 Core
  • Category deleted (Extbase: MVC)
  • Target version changed from Extbase 6.3 to 7.0
  • TYPO3 Version set to 4.5

Hi Franz,

can you push your patch to Gerritt?

#30 Updated by Franz Koch over 5 years ago

I highly doubt it'll apply easily on current version and I don't have the time to dig into Extbase internals for days again. I wrote this patch back when I was involved with Extbase development and knew my ways around in the persistence layer and everything, but now I'm out and I haven't been following the internal changes in the last year(s). So somebody else is probably better qualified.

#31 Updated by Alexander Opitz over 5 years ago

  • Status changed from Needs Feedback to New
  • Assignee deleted (Franz Koch)

#32 Updated by Franz Koch over 5 years ago

please note that my patch was working fine back then and I refactored the implementation several times. So it should still be a good starting ground if somebody want's to pick it up.

#33 Updated by Alexander Opitz over 5 years ago

  • Category set to Extbase

#34 Updated by Mathias Schreiber over 5 years ago

  • Target version changed from 7.0 to 7.1 (Cleanup)

#35 Updated by Benni Mack almost 5 years ago

  • Target version changed from 7.1 (Cleanup) to 7.4 (Backend)

#36 Updated by Susanne Moog almost 5 years ago

  • Target version changed from 7.4 (Backend) to 7.5

#37 Updated by Benni Mack over 4 years ago

  • Target version deleted (7.5)

#38 Updated by Susanne Moog over 1 year ago

  • Duplicates Bug #62277: TCA > Config > type group - foreign_table necessary for extbase to work added

#39 Updated by Susanne Moog over 1 year ago

  • Status changed from New to Closed

As the patch does not apply anymore and the same topic is handled in #62277 I'm closing this task for now.

Also available in: Atom PDF