Bug #87162

Width and Height in translated meta data records not updated, when original file is replaced

Added by Helmut Hummel over 2 years ago. Updated almost 2 years ago.

Should have
File Abstraction Layer (FAL)
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
metadata, languages
Is Regression:
Sprint Focus:


Width and height of an image is stored in meta data records.
These properties are extracted by FAL API when a new image is uploaded.
When meta data is localized, DataHandler should take care to update these properties in localized record (see https://forge.typo3.org/issues/81096)

Given a localized meta data record is created exists for a file
When the image is replaced using the file list
I would expect that width and height is updated in all meta data records according to the new image

What actually happens, is that only the meta data record with sys_language_uid = 0 is updated

Related issues

Related to TYPO3 Core - Bug #81096: Images wrongly cropped in translated pagesAccepted2017-05-01


Updated by Helmut Hummel over 2 years ago

  • Related to Bug #81096: Images wrongly cropped in translated pages added

Updated by Susanne Moog over 2 years ago

  • Tags set to metadata, languages

Updated by André Buchmann almost 2 years ago

This behaviour is the same in TYPO3 9.5

If you have a bunch of replaced images and need to fix the data you could use this statement. It searches for differences in width and height fields between translation and parent record and updates the translation fields with the value of the l10n_parent.

UPDATE `sys_file_metadata` AS `dest`,
SELECT `translation`.`uid`, `translation`.`l10n_parent`, `translation`.`width`, `translation`.`height`, `parent`.`width` AS `parent_width`, `parent`.`height` AS `parent_height`
FROM `sys_file_metadata` `translation` 
INNER JOIN `sys_file_metadata` `parent` ON `translation`.`l10n_parent` = `parent`.`uid` 
WHERE (`translation`.`width` <> `parent`.`width`) OR (`translation`.`height` <> `parent`.`height`)
) AS `src`
SET `dest`.`width` = `src`.`parent_width`, `dest`.`height` = `src`.`parent_height`
WHERE `dest`.`uid` = `src`.`uid`

Also available in: Atom PDF