Review main Merged

86444[BUGFIX] Render hreflang properly in TypoScript getData

Benni Mack CR +2 V +2 Easy +26 −4 updated 10/15/25, 15:47

Commit message

"hreflang" can be set manually in the site config, but
if empty, the locale is used by default.

Before this patch, the fallback to "locale:full"
prevented to actually retrieve the specific
"hreflang" attribute (available via
`siteLanguage->toArray()['hreflang']`).

With this patch, the override is removed, retrieving
the actual value if set, or falling back thanks
to the `toArray` fallback implementation:

```
  'hreflang' => $this->hreflang ?: $this->locale->getName(),
```

As a drive-by, a not-needed null-coalescing on the
return value is removed as well.

Review

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

Issues 5

Files 2

Review log 1725

  1. Benni Mack uploaded patch set 1 10/07/24, 11:59

  2. core-ci voted on patch set 1 V +1 10/07/24, 12:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67231

  3. Oliver Hader updated the commit message in patch set 2 V +1 10/18/24, 14:00

  4. Oliver Hader rebased onto patch set 3 10/28/24, 11:38

  5. core-ci voted on patch set 3 V +1 10/28/24, 11:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68723

  6. Benni Mack marked it work in progress 01/22/25, 11:50

  7. Benni Mack updated the commit message in patch set 4 V +1 07/24/25, 15:29

  8. Benni Mack marked it ready for review 07/24/25, 15:31

  9. Benni Mack updated the commit message in patch set 5 07/24/25, 15:33

  10. Benni Mack updated the commit message in patch set 6 07/24/25, 15:35

  11. core-ci voted on patch set 4 V -1 07/24/25, 15:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82260

  12. core-ci voted on patch set 5 V -1 07/24/25, 15:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82263

  13. core-ci voted on patch set 6 V -1 07/24/25, 15:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82265

  14. Benni Mack rebased onto patch set 7 V -1 07/24/25, 17:11

  15. core-ci voted on patch set 7 V +1 07/24/25, 17:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82272

  16. Garvin Hicking commented on patch set 7 08/09/25, 09:28

    ContentObjectRenderer.php:4084

    not a review but - should we have a fallback then when hreflang is not set to fallback to locale:full or is it covered at some other place?
  17. Benni Mack commented on patch set 7 08/29/25, 18:04

    ContentObjectRenderer.php:4084 Reply

    it's already covered.
  18. Garvin Hicking uploaded patch set 8 V +1 09/24/25, 08:19

  19. Garvin Hicking uploaded patch set 9 09/24/25, 08:20

  20. core-ci voted on patch set 9 V +1 09/24/25, 08:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85437

  21. core-ci voted on patch set 8 V +1 09/24/25, 08:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85436

  22. Garvin Hicking voted on patch set 9 CR +1 V +1 09/24/25, 08:48

  23. Christian Kuhn voted on patch set 9 CR +1 V +1 10/15/25, 15:06

  24. Benni Mack voted on patch set 9 CR +2 V +2 10/15/25, 15:47

  25. Benni Mack merged patch set 10 10/15/25, 15:47