FluidTYPO3 / fluidcontent

TYPO3 extension Fluidcontent: Fluid Content Element Engine
71 stars 64 forks source link

Severe Translation Error: Translating content elements that contain a FAL image does lead to incorrect sys_file_reference entries - incorrect uid_foreign and sys_language_uid #398

Closed DenisMir closed 7 years ago

DenisMir commented 7 years ago

We got a pretty severe problem with the latest FluidTypo3 extension family. We are using the latest master versions of vhs, fluidcontent, fluidpages and flux. They are running on TYPO3 7.6.16 LTS (composer mode) running on PHP 7.0.16.

When translating via copy mode from the default language to another language everything gets copied correctly but the content elements that contain a FAL image do lack the image reference in the new language.

After digging through the typo3 tables I found the reason for it. While copying a content element containing a FAL image from the default language to the foreign language another sys_file_reference entry gets created but for the wrong foreign_uid and sys_language_uid. The foreign_uid used is the uid from the original (root) content element of the default language. The sys_language_uid is set to 0. (default)

This has two impacts:

  1. The image reference is missing for the copied content element
  2. Even worse the original element has now two references in the sys_file_reference table which leads to errors while opening in the backend and frontend depending on how you output them.

I'm not sure if this is a bug in fluidcontent or flux but it creates sys_file_reference duplicates when not stopping your editors to translate content containing FAL images.

NamelessCoder commented 7 years ago

Duplicate of https://github.com/FluidTYPO3/flux/issues/1380 which contains more information.