Issue Bug Closed

#84563Default file properties in sys_file_reference ignored

Tim Schreiner 03/29/18, 21:52 updated 10/02/18, 10:51

Description

When a file reference is added without setting any properties and file original file properties are updated after that, the reference does not use them.

Steps to reproduce:

  1. Upload an image to fileadmin
  2. Create a file reference for that image in a content element without adding any data
  3. Update some file property, that could be overwritten in the reference (e.g alternative text)
  4. Check the frontend rendering of that image

Expected result:
The newly entered alternative text should be used for that reference because no other text was entered in the reference.

Current result:
There will ne no alternative text for that image.
The problem is, that there is an empty string written into the sys_file_reference table by default when adding a file without the property set. But TYPO3 needs this field to be NULL to use the default as override.

Possible solution:
When adding a reference for a file, check if the overridable fields for that image are empty. If so, set the sys_file_reference column to NULL instead of an empty string.

Reviews 2