mm-relation: foreing uid is saved in uid_local and vice versa
I have extended fe_users with
syscat, a field for selecting
sys_category items to make fe_users work with sys categories.
'syscat' => array( 'exclude' => 0, 'label' => 'Anlæg', 'config' => array( 'type' => 'select', 'renderType' => 'selectSingle', 'foreign_table' => 'sys_category', 'foreign_table_where' => ' AND sys_category.sys_language_uid IN (-1, 0) ORDER BY sys_category.title ASC', 'MM' => 'sys_category_record_mm', 'MM_opposite_field' => 'items', 'MM_match_fields' => array( 'fieldname' => 'syscat', 'tablenames' => 'fe_users' ), 'size' => 1, 'maxitems' => 1 ) )
The mm-data was stored in wrong fields and
sys_category_record_mm was missing. With the attached patch it seems to be fixed.
TYPO3 version: 7.6
Updated by Stanislas Rolland over 4 years ago
- Status changed from Under Review to New
- Assignee set to Stanislas Rolland
Could you please test this patch: https://review.typo3.org/51415
You will need to use the current master. Or, perhaps you could adapt your patch to the logic of mine:
If MM_opposite_field is set in the TCA configuration of the field, then the field stands on the foreign site of the mm-relation, otherwise it stands on the local side.
In the case of the system categories, the sys_category table is on the local side of the relation, the categorized tables are on the foreign side.