[TYPO3-dev] Problem with IRRE m:n and useCombination - probable bug? - 7.6 LTS

Florian Sauer outer.circle at web.de
Wed Aug 16 18:03:58 CEST 2017


Friends of IRRE,

Using Typo3 7.6 LTS

I am porting am extension I wrote for V 4.5 to 7.6 and Extbase.
The extension uses a m:n relationship and some attributes on the intermediate table and has worked so far.
The TCA is modelled similar to this:
https://wiki.typo3.org/Inline_Relational_Record_Editing_Attributes

and uses "useCombination => true" so child records can directly be added or edited within the main record.

After having ported it to 7.6 the backend shows errors for child records: child records not found or wrong child records.

I investigated further and found after some debugging that the child record UID is crippeled.

Example:
MM table points to a child record with UID 1002. BUT the backend tries to fetch the record with UID 1.

So all child UIDs get truncated to a number with just 1 digit.

I found that there are two code lines in the core which are responsible for that:

TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline.:compileChildChild(array $child, array $parentConfig):
...
$childChildUid = $child['databaseRow'][$parentConfig['foreign_selector']][0]

and
TYPO3\CMS\Backend\Controller\FormInlineAjaxController:compileChildChild(array $child, array $parentConfig, array $inlineStructure)
..
$childChildUid = $child['databaseRow'][$parentConfig['foreign_selector']][0]

The problem seems to be the last "[0]". Once I delete this [0] everything is working fine.
In my understanding of the code the "[0]" makes no sense because child['databaseRow'] holds 1 record of the mm table and this 1 record points to exactly 1 child record.
But with the "[0]" I understand why a child UID like "4335" is truncated to just "4".

My questions:

- Has anyone of you a successful m:n installation on 7.6 with more than 9 child records and "useCombination=true"?

- Might this be a bug? Should I report it to the bug tracker? Or have I overlooked something else? I checked Typo3 V8 - the code lines there have remained unchanged.

Obviously I am reluctant to patch the core code myself because that might have other implications as well which I do not oversee.

Any thoughts are greatly appreciated.

Regards,

finnegan




More information about the TYPO3-dev mailing list