Project

General

Profile

Actions

Bug #84563

closed

Default file properties in sys_file_reference ignored

Added by Tim Schreiner over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2018-03-29
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #81235: Image metadata (description) isn´t shown in content elementClosed2017-05-16

Actions
Actions #1

Updated by Frans Saris over 6 years ago

This should already be the case.

Did you use the default core content elements?

Do you have the override checkboxes when editing the sys_file_reference?

Actions #2

Updated by Tim Schreiner over 6 years ago

Frans Saris wrote:

This should already be the case.

Did you use the default core content elements?

Do you have the override checkboxes when editing the sys_file_reference?

I have tested it on the current master with the default Text & Media content element.
The problem is, that when no default value exists, but placeholder is defined in TCA and empty, the checkbox get automatically checked. So the record will not use the default value, even if it is set afterwards.
I got a fix for that. After that fix, the editor has to opt-in the the checkbox, if he wants to override the value. Will pushing it to gerrit soon for further discussion.

Actions #3

Updated by Gerrit Code Review over 6 years ago

  • Status changed from New to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56486

Actions #4

Updated by Tymoteusz Motylewski over 6 years ago

  • Related to Bug #81235: Image metadata (description) isn´t shown in content element added
Actions #5

Updated by Gerrit Code Review over 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56486

Actions #6

Updated by Gerrit Code Review over 6 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56486

Actions #7

Updated by Frans Saris over 6 years ago

  • Is Regression set to Yes
Actions #8

Updated by Gerrit Code Review over 6 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56989

Actions #9

Updated by Tim Schreiner over 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF