[TYPO3-mvc] Updating a list empties it!
Xavier Perseguers
xavier at typo3.org
Tue May 10 12:03:47 CEST 2011
Hi,
> Actually my contacts get added to the _mm table successfully but
> Extbase, for some reason, does not populate column "tablenames" with
> "fe_users" this leads to "unlinked" records and thus the repository (and
> TYPO3 in BE) does not see those related records anymore. It does that
> even for existing relations, not only for the newly added contact.
>
> Furthermore, column "contacts" of table "services" is set to the number
> of contacts when using TYPO3 BE but is set to 0 when using Extbase in
> FE. This does not impact anything in regard to the relations but it's a
> difference of behavior.
OK, here's the point!
Structure of MM table for blog_example is as such:
uid_local
uid_foreign
sorting
sorting_foreign
whereas my structure is this one:
uid
pid
uid_local
uid_foreign
tablenames
sorting
sorting_foreign
tstamp
crdate
hidden
Don't know why but I guess this is related to some automatically
generated code from kickstarter a long time ago. My TCA then looks like
that:
'MM_match_fields' => array(
'tablenames' => 'fe_users'
),
and as the tablenames column is not populated, the relations are lost!
I just removed this condition and this suddenly works as expected. I
guess I could now easily get rid of unneeded columns too.
--
Xavier Perseguers
Release Manager TYPO3 4.6
TYPO3 .... inspiring people to share!
Get involved: http://typo3.org
More information about the TYPO3-project-typo3v4mvc
mailing list