Task #63928
closedWhy is MM_opposite_field working with inline?
0%
Description
Hi,
I have this situation:
A bidirectional MM relation
events <-> projects
In event I use select:
'projects' => array( ... 'config' => array( 'type' => 'select', 'foreign_table' => 'tx_extendeventmgmt_domain_model_projects', ...
In project is use inline:
'events' => array( 'exclude' => 1, 'label' => 'LLL:EXT:eventmgmt/Resources/Private/Language/locallang_db.xlf:tx_eventmgmt_domain_model_event.events', 'config' => array( 'type' => 'inline', 'foreign_table' => 'tx_eventmgmt_domain_model_event', 'MM' => 'tx_extendeventmgmt_event_projects_mm', 'MM_opposite_field' => 'projects', 'appearance' => array( 'collapseAll' => 0, 'levelLinksPosition' => 'top', 'collapseAll' => TRUE, 'showPossibleLocalizationRecords' => 1, ), 'behaviour' => array( 'localizationMode' => 'select', 'localizeChildrenAtParentLocalization' => TRUE, ), 'size' => 10, 'autoSizeMax' => 30, 'maxitems' => 9999, 'multiple' => 1, ), ),
When I select a project on the event side the event should also be shown on the project side.
When I add 'MM_opposite_field' => 'projects' it works, if I don't it doesn't.
As far as I know MM_opposite_field is just for "select", not for "inline" and the documentation (http://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Inline/Index.html) says nothing about MM_opposite_field.
Updated by Mathias Schreiber over 9 years ago
- Status changed from New to Needs Feedback
I didn't test myself, so please bear with me.
From reading your report, I consider this a documentation issue, right?
So mm_opposite needs to be set in order for the feature to work.
Did I get this right so far?
Updated by Eike Starkmann over 9 years ago
Yeah this is right.
If this feature is meant to work together with inline then yes it is a documentation issue.
But I'm not sure if it is really meant to work with inline.
Is there a way of building bidirectional MM relation without mm_opposite_field?
Updated by Alexander Opitz almost 9 years ago
- Status changed from Needs Feedback to New
Updated by Susanne Moog about 5 years ago
- Tracker changed from Story to Task
- Category changed from FormEngine aka TCEforms to Documentation
- TYPO3 Version changed from 6.2 to 9
- Complexity set to easy
New docs link: https://docs.typo3.org/typo3cms/TCAReference/ColumnsConfig/Type/Inline.html
As far as I can see from the examples we have in the styleguide extension, there are more valid fields for inline MM relations than documented. Example from styleguide:
'parents' => [ 'exclude' => 1, 'label' => 'parents', 'config' => [ 'type' => 'inline', 'foreign_table' => 'tx_styleguide_inline_mm_child', 'MM' => 'tx_styleguide_inline_mm_child_childchild_rel', 'MM_hasUidField' => true, 'MM_opposite_field' => 'inline_2', 'maxitems' => 10, 'appearance' => [ 'showSynchronizationLink' => 1, 'showAllLocalizationLink' => 1, 'showPossibleLocalizationRecords' => 1, 'showRemovedLocalizationRecords' => 1, ], ], ],
Docs should be adjusted.
Updated by Susanne Moog about 4 years ago
- Status changed from New to Closed
Reported with a reference to this issue, closing here and tracking at https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-TCA/issues/272