Project

General

Profile

Actions

Bug #83140

closed

Images not shown when metadata is translated

Added by Patrick Broens almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
Start date:
2017-11-28
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

How to reproduce:
  • Have at least one extra language
  • Upload image in filelist
  • Fill the metadata
  • Translate the metadata of this image
  • Make a content element of type "image" in default language
  • Make reference to this image in the content element
  • Translate the content of this page
  • Show translated page in frontend
Result:
  • The image is not there, the translated metadata is shown
  • The img tag is using 0 (zero) for both width and height

Reason:
The column type of width and height are not declared in sys_file_metadata
When declaring the type input for these fields, probably with a readOnly => true, the image is shown again, because the contents of the width and height column are transferred to the translation using l10n_mode = exclude

When adding the following to Configuration/TCA/Overrides/sys_file_metadata.php in my own extension it works

$GLOBALS['TCA']['sys_file_metadata'] = array_replace_recursive(
    $GLOBALS['TCA']['sys_file_metadata'],
    [
        'columns' => [
            'width' => [
                'config' => [
                    'type' => 'input',
                    'readOnly' => true
                ]
            ],
            'height' => [
                'config' => [
                    'type' => 'input',
                    'readOnly' => true
                ]
            ],
        ]
    ]
);

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #73076: Publishing of changed sys_file_metadata fails because of missing config array for with and height fieldsClosed2016-02-02

Actions
Has duplicate TYPO3 Core - Bug #83247: Translating sys_file_metadata results in width 0 and height 0Rejected2017-12-07

Actions
Actions #1

Updated by Frans Saris almost 7 years ago

Or maybe use type = 'passthrough'

Could this a side effect of the changed language overlay behavior in 8 LTS?

Actions #2

Updated by Patrick Broens almost 7 years ago

Frans, that is a better solution.

Actions #3

Updated by Patrick Broens almost 7 years ago

  • Related to Bug #73076: Publishing of changed sys_file_metadata fails because of missing config array for with and height fields added
Actions #4

Updated by Patrick Broens almost 7 years ago

  • Status changed from New to Closed

Closing since it is solved in #73076

Actions #5

Updated by Frans Saris almost 7 years ago

  • Has duplicate Bug #83247: Translating sys_file_metadata results in width 0 and height 0 added
Actions

Also available in: Atom PDF