placeholder pointing to column of related record shows values from wrong language
Hope this is not a duplicte.
If i create a file Reference on default language it happens that the placeholder is calculated from some translation.
In my case i added a media-field and handle inline relations to sys_file_reference records. When i edit the default language the meta title|alternative of the first translation record is shown.
The data is saved correctly, so the aggregate and the sys_file_reference both have sys_language_uid set to 0 - but still the wrong metadata is used as placeholder.
The language setting should be taken into account there.
Updated by Jeffrey Nellissen about 5 years ago
I also can confirm this bug in the current stable version 7.6.9. It is really confusing for our editors and it is not only happened in the default language. The placeholder for the title, caption,... will always taken his content from the last created language version of a sys_file, not from the choosen sys_language. Like Florian wrote, in FE it works like a charm.
Updated by Andreas Wolf about 5 years ago
- Status changed from New to Accepted
I can also confirm this. My use case was a relation to sys_file, which resolves the placeholders from sys_file_metadata. The problem here is that the sys_language_uid is not available when resolving the records, which happens in
TcaInline::resolveRelatedRecords(). Therefore, a list of the sys_file_metadata records for all languages is fetched, from which one is semi-randomly chosen (it always uses the first one returned).
My idea for a fix is to add the language to use to
$result, which then needs to pass it on. In general, it would be good to pass on this context in a more robust way, both here and in DataHandler.
Updated by Florian Baumann over 4 years ago
There is no need for an extension to reproduce that.
Do the following on an instance with more than one language installed:
1) Add a new file to the FAL
2) Add the file's FAL record translations (fill in the title) for all the available languages
3) Add a new text & media content element and import the newly created file there
4) Take a look at the title field. You will notice the last created translation of the file as a default placeholder there
I just tested this on a TYPO3 7.6.12. The issue still persists.