Review main Merged

95140[BUGFIX] Correct handling of page translations in LinkAnalyzerResult

Juliane Wundermann CR +2 V +2 Easy +5 −1 updated 08/11/26, 15:29

Commit message

Page IDs for the default language were always merged with translated pages. Pages in the default language are now only merged if the language IDs are empty or if the default language has been explicitly configured.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • René Pflamm +1
    • Markus Klein +1
    • Oliver Hader +1
  • Verified V +2 Done
    • Benni Mack +2
    • René Pflamm +1
    • Markus Klein +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1216

  1. Juliane Wundermann uploaded patch set 1 08/06/26, 20:08

  2. Juliane Wundermann updated the commit message in patch set 2 08/06/26, 20:10

  3. core-ci voted on patch set 1 V -1 08/06/26, 20:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106044

  4. core-ci voted on patch set 2 V -1 08/06/26, 20:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106045

  5. René Pflamm uploaded patch set 3 V -1 08/06/26, 20:38

  6. core-ci voted on patch set 3 V +1 08/06/26, 20:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106052

  7. Markus Klein commented on patch set 3 08/06/26, 22:08

    LinkAnalyzerResult.php:106

    I'd prefer a strict comparision, instead of `empty()`, because it does unnecessary checks. Other than that, in_array should be used with strict typing too. ```suggestion if ($languageIds === [] || in_array(0, $languageIds, true)) { ``` Besides that, I'm not sure if the check for `0` is actually needed at all, since we use intExplode with third param true, which will always remove empty and zero values from the array.
  8. Juliane Wundermann uploaded patch set 4 V +1 08/07/26, 08:45

  9. core-ci voted on patch set 4 V +1 08/07/26, 08:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106103

  10. Juliane Wundermann commented on patch set 4 08/07/26, 08:54

    LinkAnalyzerResult.php:106 Reply

    Thank you for your comments. I've incorporated them. The check for 0 is necessary. The following scenarios apply: 1. No languages are configured in the scheduler -> all languages should be checked and languageIds is empty -> merge pageIds and pageTranslations is necessary 2. Languages are configured (excluding 0—the default language) -> languageIds does not contain 0 -> merge not necessary 3. Languages are configured (including 0—the default language) -> languageIds contains 0 -> merging of pageIds and pageTranslations is necessary
  11. Oliver Hader voted on patch set 4 CR +1 08/07/26, 09:11

  12. René Pflamm voted on patch set 4 CR +1 V +1 08/07/26, 09:36

  13. Juliane Wundermann commented on patch set 4 08/09/26, 08:37

    LinkAnalyzerResult.php:106 Reply

    Done
  14. Markus Klein commented on patch set 4 CR +1 V +1 08/11/26, 08:49

    LinkAnalyzerResult.php:106 Reply

    I was wrong about the intExplode; sorry. It really only kills empty strings, but not 0-values. Then all is good. Thx for the changes.
  15. Benni Mack voted on patch set 4 CR +2 V +2 08/11/26, 15:28

  16. Benni Mack merged patch set 5 08/11/26, 15:29