Review main Merged

72044[BUGFIX] Translate image dimensions on file replace

André Buchmann CR +2 V +2 Normal +79 −0 updated 11/05/21, 11:22

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
    • Jochen Roth +1
    • André Buchmann +1
  • Verified V +2 Done
    • Benni Mack +2
    • Jochen Roth +1
    • André Buchmann +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1420

  1. André Buchmann uploaded patch set 1 11/04/21, 07:22

  2. core-ci voted on patch set 1 V -1 11/04/21, 07:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18848

  3. André Buchmann uploaded patch set 2 11/04/21, 07:28

  4. core-ci voted on patch set 2 V +1 11/04/21, 07:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18850

  5. Jochen Roth commented on patch set 2 11/04/21, 09:49

    MetaDataEventListener.php:56

    `height`
  6. Jochen Roth uploaded patch set 3 11/04/21, 10:45

  7. Jochen Roth commented on patch set 3 11/04/21, 10:46

    MetaDataEventListener.php:56 Reply

    Done
  8. core-ci voted on patch set 3 V +1 11/04/21, 11:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18861

  9. Benni Mack updated the commit message in patch set 4 11/04/21, 15:39

  10. Benni Mack updated the commit message in patch set 5 11/04/21, 15:40

  11. Benni Mack commented on patch set 5 11/04/21, 15:40

    MetaDataEventListener.php:24

    should be internal, I'd say. We can also make it final
  12. core-ci voted on patch set 4 V +1 11/04/21, 15:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18900

  13. core-ci voted on patch set 5 V +1 11/04/21, 16:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18901

  14. Jochen Roth uploaded patch set 6 11/04/21, 16:27

  15. André Buchmann commented on patch set 6 11/04/21, 16:29

    MetaDataEventListener.php:24 Reply

    Can be final from my opinion. Jochen was faster :-D
  16. André Buchmann commented on patch set 6 V +1 CR +1 11/04/21, 16:43

    MetaDataEventListener.php:24 Reply

    Done
  17. core-ci voted on patch set 6 V +1 11/04/21, 16:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18911

  18. Jochen Roth voted on patch set 6 V +1 CR +1 11/05/21, 08:46

  19. Benni Mack voted on patch set 6 V +2 CR +2 11/05/21, 11:22

  20. Benni Mack merged patch set 7 11/05/21, 11:22