Review main Merged

74632[BUGFIX] Apply empty values in language-overlay

André Buchmann CR +2 V +2 Easy +28 −1 updated 06/08/22, 11:44

Commit message

Some default fields (e.g. tt_content.bodytext) can contain null values.
TYPO3 first fetches the data in the default language and then overlays
the rows data with the translation values. The overlay method inspects
each array item with the php isset() function. This validates not only
the existence of the array key, but also the values. null and
false values evaluated as false. Empty strings evaluate as true.
This leads to inconsistent output in the frontend.

The overlay now valides only the array key existence and applies also
empty values.

Review

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

Issues 1

Files 3

Review log 1518

  1. André Buchmann uploaded patch set 1 05/12/22, 14:08

  2. core-ci voted on patch set 1 V +1 05/12/22, 14:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27144

  3. Oliver Klee voted on patch set 1 CR +1 05/12/22, 17:10

  4. Benni Mack commented on patch set 1 CR -1 05/13/22, 11:33

    This should get a test, I will provide one
  5. André Buchmann commented on patch set 1 05/13/22, 12:17

    Reply

    Thanks!
  6. Benni Mack uploaded patch set 2 06/07/22, 20:58

  7. Benni Mack commented on patch set 2 V +1 CR +1 06/07/22, 20:59

    Reply

    Done
  8. core-ci voted on patch set 2 V +1 06/07/22, 21:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27780

  9. Oli Bartsch voted on patch set 2 V +1 CR +1 06/07/22, 21:06

  10. Oliver Klee commented on patch set 2 CR -1 06/07/22, 21:14

    PageRepositoryTest.php:694

    Generally, please use assertSame instead of assertEquals unless you need the not-strict comparison. (assertSame is to assertEquals what === is to == .)

    PageRepositoryTest.php:703

    This looks like a left-over debug statement.
  11. Benni Mack uploaded patch set 3 06/08/22, 06:32

  12. Benni Mack commented on patch set 2 V +1 CR +1 06/08/22, 06:32

    PageRepositoryTest.php:694 Reply

    Done

    PageRepositoryTest.php:703 Reply

    THANKS!
  13. core-ci voted on patch set 3 V +1 06/08/22, 06:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27790

  14. Oli Bartsch voted on patch set 3 V +1 CR +1 06/08/22, 07:09

  15. Oliver Klee voted on patch set 3 CR +1 06/08/22, 09:41

  16. Benni Mack voted on patch set 3 V +2 CR +2 06/08/22, 11:38

  17. Benni Mack merged patch set 4 06/08/22, 11:38

  18. André Buchmann voted on patch set 3 V +1 CR +1 06/08/22, 11:44