Feature #88766
openUnpredictable allowLanguageSynchronization behaviour with file references
0%
Description
The TCA behaviour "allowLanguageSynchronization" has some user experience or design issues in combination with sys_file_references.
For the following examples I've used the actual TYPO3 CMS Master (10.0.x-dev) and the media field in page properties. Make sure you have at least one page with a translation.
Let's beginn simple:
1. Parallel display of buttons to add relations and translation behaviour¶
IMHO the buttons to add relations should only be displayed on translations if "custom value" is chosen.
Or the other way round, if you add a relation in a translation it should automatically switch to "custom value".
ATM if you add a relation and hit the save button while "value of default language" is still selected, the relation wont be saved. -> Bad UX
(see also topic 3)
2. Custom value != custom value¶
Starting with a empty media field (also in translations)
Step 1: Add a relation in default language and save
Step 2: Switch the translation behaviour to "custom value" in your translation and save.
Step 3: Go back to the default language of the page, delete the relation and save.
The relation is also deleted on the translated page with "custom value". The editor would first have to delete the image and add it again in the translation to keep it.
Just because the l10n_parent is set, it is not necessary right to delete the relation. The translation behaviour isn't taken into account.
3. Resync relations¶
Starting again with a empty media field (also in translations)
Step 1: Set translation behaviour "custom value" in translation
Step 2: Add a relation in default language
No relation added on translation. Yay, expected behaviour :-D
Step 3: Change translation behaviour to "value of default language" and save
The image is resynced correctly :-D
Step 4: Delete relation relation while keeping "value of default language" active and save
The image is gone for the translation until somebody saves the default language. This can be misleading for editors if they forget to switch to "custom value" at this point. This can be solved along with topic 1
4. Show warning when relation of translation is deleted¶
Starting again with a empty media field (also in translations)
Step 1: Add a relation on translation with "custom value" behaviour
Step 2: Switch translation behaviour to "value or default language" and save
Custom relation of translation is kept.
Step 3: Switch to default language and add save
Custom relation of translation is still there.
Step 4: Add new relation on default language and save
The new translation is added for all languages and the custom relation of the translation is deleted.
IMHO this is correct, but for better usability I would prefer a warning dialog when an editor changes to "value of default language" and if there are any relations without l10n_parent.
Something like: "Some relations are not connected to the default language. Are you sure to remove them?" and then delete them directly on approval.
5. Permission error¶
Starting with a empty media field (also in translations) and "value of default language" enabled
Step 1: Add relation on default language and save
Step 2: Add to "custom value, add a new relation on the translation and save
Step 3: Back on default add a new relation and save
Step 4: Switch translation behaviour back to "value of default language" and save
You should get an error like "1: Attempt to modify record 'rawpixel-1046262-unsplash.jpg' (sys_file_reference:292) without permission. Or non-existing page." for the relation added in step 2.
I hope those cases can help to improve the US with the allowLanguageSynchronization behaviour for editors.
Files
Updated by Christina Böhme over 5 years ago
Very well described. I just want to add that these problems also appears in latest TYPO3 9. TYPO3 8 is even worse, because the reference from default language cannot be restored when deleted in the translated item and you can really mess up reference in parent mode.
I tested that in a customer installation (latest TYPO3 8) and in fresh installations of latest 8 and 9 with bootstrap package. Same problem with pages, default and custom content elements and even news items.
allowLanguageSynchronization=1was set for all testet columns.
Updated by Susanne Moog almost 5 years ago
- Sprint Focus set to On Location Sprint
Updated by André Buchmann over 4 years ago
Sadly no progress here yet. But here comes an other example with text + media and following TCA overrides:
/* * Fix image handling on translations * https://forge.typo3.org/issues/88024 */ $GLOBALS['TCA']['sys_file_reference']['columns']['crop']['config']['behaviour']['allowLanguageSynchronization'] = true; /* * Allow language synchronization on text media assets */ $GLOBALS['TCA']['tt_content']['columns']['assets']['config']['behaviour']['allowLanguageSynchronization'] = true;
Updated by Jo Hasenau about 4 years ago
IMHO the actual misbehaviour in this case is, that it is actually possible to assign "custom value" to a field that contains relations to other records.
The reason is: Unless you are in "free" AKA "copy mode", the default language has the "lead" over all target languages. This means, it determines which records are connected and the order of those records. - Having "custom values" here, would break that principle, since it would actually simulate the free mode behaviour.
So the core has to check, if there is a language parent for that particular element and if so, it must disable the language synchronization for each field containing those relations.
IMHO it is a good idea to have language synchronization for pure text based translations though, so keeping the setting for the "crop" field would be fine, while having it for the "assets" field should be possible in free mode only.
Updated by André Buchmann almost 4 years ago
- Related to Bug #88024: allowLanguageSynchronization doesn't synchronise cropping from images added
Updated by Henrik Ziegenhain almost 4 years ago
Fully agree to Andrés description and comment by Jo.
The workaround of Andé is working for me.
Is there any chance to push this forward and maybe see it in Core?!
Maybe our client is willing to sponsor this bugfix.
Updated by Ephraim Härer over 3 years ago
Hello Henrik,
do you have a workaround for the problem with page media field?
Updated by Oliver Hader about 2 years ago
- Sprint Focus deleted (
On Location Sprint)
Updated by Jo Hasenau over 1 year ago
- Related to Story #101561: DataHandler related translation issues added