Actions
Bug #83140
closedImages not shown when metadata is translated
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
- 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
]
],
]
]
);
Actions