[TYPO3-english] Bug in TYPO3 4.4: MM relations fail in BE when localized?

André Spindler typo3 at andre-spindler.de
Tue Feb 15 14:57:45 CET 2011


Hello list,

I have found a problem in one of my extensions.
At the moment I don't know if it's a bug of TYPO3 of if I there is some
config missing...

Summary:
When a field with m:m realtions is translated and uses a language fallback,
in the translated record not the correct entries are shown, but the single
record which uid is the same as the number of related records in the
original record.

The Installation runs with TYPO3 4.4.4.
In my extension I have some tables but only two are important here:
I have a table "entries" for contacts and a table "function" to describe the
function of a person within a division.
As the same person can have different functions in different division, I use
m:m realations with an additional table. The order of the entries is also
important.
When creating the records in default language, everything is fine. I create
contacts and add them to the different functions. Works in BE and in FE (my
plugin).

The failure occurs when I translate the records.
Localization of contacts is still no problem. There are some fields to be
translated (address, vita, ...), some not (image, ...). I use 'l10n_mode' =
'exclude' and 'l10n_display' = 'defaultAsReadonly' to get some fields not to
be translated and to have a fallback.
But I have a problem when I localize a function record. It doesn't make
sense to change the relations of contacts and functions between divisions.
So I have set this two options 'l10n_mode' = 'exclude' and 'l10n_display' =
'defaultAsReadonly' also for this field with the m:m relation. The record's
should be displayed, but they should not be modified in the translation.

The Failure itself with an example:
In the default language there are two contacts selcted: "Mr. Klein" and "Mr.
Meier". But in the translated record, none of these two records is shown,
but a different one: "Mr. Schatz". And the uid of "Mr. Schatz" is 2!. If I
add a third contact in the default language, in the translated record I see
another contact: "Mr. Schmidt". It's the contact with uid 3.
-> very strange:
Original record:			Translated record:
1 entries			entry with uid = 1
2 entries			entry with uid = 2
3 entries			entry with uid = 3
...

Is this a bug, then I will submit it to bugs.typo3.org, or do I have
forgotten to setup something, perhaps?
The localization features are enabled in both tables. And localization of
the records itself is working (and done with the default localization
functions of TYPO3), but not for the relations between the records.
In my FE plugin everything is fine. The db entries are correct. Only the
output of the data in BE is wrong.

Thanks,
André



More information about the TYPO3-english mailing list