Review 13.4 Merged

87570[BUGFIX] Fix site settings hash calculation

Benjamin Franzke CR +2 V +2 Normal +103 −1 updated 12/19/24, 11:50

Commit message

The site-constants cache key in method
`addDefaultTypoScriptConstantsFromSite` of
`SysTemplateTreeBuilder` uses `json_encode()`
in order to build a hash of the site settings object.

With #104858 site settings were expanded to
allow setting-key access via `$settings->get('foo.bar')`
for defined settings and missed to adapt the `jsonSerialize()`
method to continue to return the settings tree instead of the
reduced settings map (which is limited to
settings defined in `settings.definitions.yaml`).

This leads to broken TS caches with multiple sites:
Settings from one site spill over to other sites,
depending on which one was called first after cache clear.

A regression test replays the scenario to proof correctness
of the code change.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
  • Verified V +2 Done
    • Benjamin Franzke +2
    • core-ci +1 CI

Issues 2

Files 3

Review log 34

  1. Benjamin Franzke commented on patch set 1 12/19/24, 11:40

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 12/19/24, 11:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71449

  3. Benjamin Franzke voted on patch set 1 CR +2 V +2 12/19/24, 11:50

  4. Benjamin Franzke merged patch set 2 12/19/24, 11:50