Width and Height in translated meta data records not updated, when original file is replaced
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
#3 Updated by André Schließer 3 months 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`