Review 10.4 Merged

71925[BUGFIX] Translate image dimensions on file replace

Benni Mack CR +2 V +2 Normal +76 −0 updated 12/17/21, 14:52

Commit message

Width and height of an image is stored in translatable metadata
records. These properties are extracted by FAL API when a new image is
uploaded. The TYPO3\CMS\Core\Resource\Index\Indexer::updateIndexEntry
method uses the MetaDataAspect to save the new file dimensions.

As the MetaDataAspect has no support for multi-language, it only updates
the default language. A new PSR-14 event listener is added on
AfterFileMetaDataUpdatedEvent to overcome the lack of translation
support. It updates the width and height of all corresponding
sys_file_metadata translations.

Wrong dimensions leads to rendering issues in the frontend when the
image is cropped as the crop area can't be calculated properly.

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 1

Files 2

Review log 711

  1. Benni Mack commented on patch set 1 11/05/21, 11:22

    Cherry Picked from branch master.
  2. core-ci voted on patch set 1 V -1 11/05/21, 11:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18940

  3. Benni Mack commented on patch set 2 11/05/21, 11:33

    Published edit on patch set 1.
  4. core-ci voted on patch set 2 V -1 11/05/21, 11:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18944

  5. Benni Mack uploaded patch set 3 11/05/21, 11:52

  6. core-ci voted on patch set 3 V -1 11/05/21, 12:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18948

  7. Benni Mack commented on patch set 4 11/05/21, 12:07

    Published edit on patch set 3.
  8. core-ci voted on patch set 4 V +1 11/05/21, 12:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18949

  9. Benni Mack voted on patch set 4 V +2 CR +2 11/05/21, 12:31

  10. Benni Mack merged patch set 5 11/05/21, 12:31

  11. Oliver Hader commented on patch set 5 12/17/21, 14:52

    → this seems to cause a regression in TYPO3 v10 Doctrine DBAL prior to v2.13