Bug #59161
closedMetadata and File Reference inconsitency
0%
Description
Currently, the usage of Metadata in File References is a bit distracting.
Once the sysext filemetadata is installed, there are two fields in a file:
- Description
- Caption
In sys_file_reference, the label is called
Description (Caption)
and it takes the data from the description field.
This can be confusing for editors. I'm aware that I can just overwrite the field names and hide the not needed fields, but I want to check whether you think that the current default state is OK in your eyes.
Files
Updated by Lorenz Ulrich almost 10 years ago
Updated by David Lemaitre almost 10 years ago
I was confused first time. What is the purpose of the 'caption' field ?
Updated by Andreas Wolf almost 9 years ago
- Status changed from New to Accepted
This can be fixed by inserting the following TypoScript where appropriate:
tt_content.image.20 { caption.1.1.data = file:current:caption rendering.singleNoCaption.fallbackRendering.10.if.isTrue.data = file:current:caption preRenderRegisters.allImageCaptions.cObject.renderObj.data = file:current:caption }
The first two lines fix the actual problem, the third one is AFAIS required to get the rendering as a whole right with the different field.
Updated by Birte Weishaupt almost 9 years ago
- File screen_bu4.jpg screen_bu4.jpg added
When adding an image to a content element, the content element now shows data from the field caption while the frontend still uses the field description. This behavior seems to have changed during one of the last updates. Tested with 6.2.9 and 6.2.13.
Updated by Christian Eßl over 4 years ago
- Category set to File Abstraction Layer (FAL)
Updated by Susanne Moog about 4 years ago
A bit of background information:
- The fallback is configured via TCA "useOrOverridePlaceholder" where one could theoretically configure any field to be displayed in the backend
- The frontend however does not care at all about this setting, instead the parent file meta data properties are merged with the file reference properties --> meaning this works for fields having the exact same field name in sys_file_metadata as in sys_file_reference
- The frontend templates all reference file.description to get that value
I'm unsure if/how this could be fixed.
For reference see:
- typo3/sysext/core/Configuration/TCA/sys_file_reference.php:170
- typo3/sysext/fluid_styled_content/Resources/Private/Partials/Media/Type/Image.html
- \TYPO3\CMS\Core\Resource\FileReference::getProperties
Updated by Lorenz Ulrich about 4 years ago
Thanks for your reply, Susanne. I think this issue can be closed. While I still think that the naming is inconsistent, everyone (including me) will have adjusted to this inconsistency by now and configured it the way they need it.
Updated by Susanne Moog about 4 years ago
- Status changed from Accepted to Closed
Thanks for your quick answer - I'm going to close the issue here but keep it in mind for a refactoring (as I think it might make sense to streamline the TCA and frontend behaviour in the long run)