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
]
],
]
]
);
Updated by Frans Saris about 7 years ago
Or maybe use type = 'passthrough'
Could this a side effect of the changed language overlay behavior in 8 LTS?
Updated by Patrick Broens about 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
Updated by Patrick Broens about 7 years ago
- Status changed from New to Closed
Closing since it is solved in #73076
Updated by Frans Saris about 7 years ago
- Has duplicate Bug #83247: Translating sys_file_metadata results in width 0 and height 0 added
Actions