[TYPO3-dev] MM-Problem

Steffen Kamper info at sk-typo3.de
Thu May 28 09:23:49 CEST 2009


Hi,

Mathias Schreiber [wmdb >] schrieb:
> Steffen Kamper schrieb:
>> Hi Steffen :-),
>>
>> found the problem in mm_table
>> tablenames varchar(30) DEFAULT '' NOT NULL,
>>
>> 30 is too short, table had 31 chars.
> 
> You need a blog ;-)
> btw. ran into this problem too.
> 

my blog is the mews list :)

Summery:
The doc doesn't help here, so if you have a shared mm-Table for more 
than one table create the mm-table like this:

#
# Table structure for table 'tx_mfceditionsprojekte_relations_mm'
#
CREATE TABLE tx_xyz_relations_mm (
   uid_local int(11) unsigned DEFAULT '0' NOT NULL,
   uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
   tablenames varchar(80) DEFAULT '' NOT NULL,
   sorting int(11) unsigned DEFAULT '0' NOT NULL,
   sorting_foreign int(11) unsigned DEFAULT ‘0′ NOT NULL,

   KEY uid_local (uid_local),
   KEY uid_foreign (uid_foreign)
);

The fields using the mm-table need following setting:

'MM' => 'tx_xyz_relations_mm',
'MM_match_fields' => array('tablenames' => 'tx_name_of_the_foreign_table'),
'neg_foreign_table' => 'tx_name_of_the_foreign_table',

where MM_match_fields is needed to identify the right foreign table and
neg_foreign_table force to write the tablenames in mm-table. This naming 
is totally misleading, description in doc tells something about negative 
uids which is not the case.

All the settings work for the type=select, with type=group it may differ.

vg Steffen




More information about the TYPO3-dev mailing list