Issue Bug Closed

#106666Site Sets and TypoScript Conditions

Achim Fritz 05/07/25, 15:05 updated 12/02/25, 14:21

Description

having a Installation with two sites, and :

clipboard-202505071649-peiwp.png

having two Site-Sets, where Set2 depends on Set1

cat Sets/Site1/config.yaml 
name: local/site1
label: local/site1
cat Sets/Site2/config.yaml 
name: local/site2
label: local/site2
dependencies:
  - local/site1

use local/site1 as dependency in site config of site1
use local/site2 as dependency in site config of site2

base: 'https://core13.ddev.site/'
dependencies:
  - local/site1
rootPageId: 1
base: 'https://core13-2.ddev.site/'
dependencies:
  - local/site2
rootPageId: 2

now add some fancy TS

cat Sets/Site1/setup.typoscript 
config.disableAllHeaderCode = 1
page = PAGE
page.10 = COA_INT
page.10.10 = TEXT
page.10.10.value = default

[traverse(page, "uid") == 3]
  page.10.10.value = we are on page 3
[end]
cat Sets/Site2/setup.typoscript 
[traverse(page, "uid") == 4]
  page.10.10.value = we are on page 4
[end]

now call pages in this order

curl https://core13.ddev.site/page-3
echo ""
curl https://core13.ddev.site/
echo ""
curl https://core13-2.ddev.site/page-4
echo ""
curl https://core13-2.ddev.site
echo ""

we get

we are on page 3
default
we are on page 4
we are on page 4

so on root page of site 2 we get “we are on page 4” instead of “default“
(flushing cache and call root page of site 2 gives expected “default”)

(the bug occures not, if we have no site-sets, but use TS-Imports)
(only testet with TYPO3 13)

Reviews 2

Files 1

History 1116

  1. Christian Kuhn commented <span data-processor="relativetime" data-value="2025-05-07T18:56:58+00:00" > 05/07/25, 18:56 </span>

    rather nasty site-set-ts-parsing edge case thingie. i’ll try to get to the bottom of this soon.

  2. Christian Kuhn commented <span data-processor="relativetime" data-value="2025-05-08T09:52:35+00:00" > 05/08/25, 09:52 </span>

    the second call can be left out to reproduce:

    curl https://core13.ddev.site/page-3
    echo "" 
    curl https://core13-2.ddev.site/page-4
    echo "" 
    curl https://core13-2.ddev.site
    echo ""
    we are on page 3
    we are on page 4
    we are on page 4
  3. Christian Kuhn commented and changed status Under Review New <span data-processor="relativetime" data-value="2025-05-08T10:58:18+00:00" > 05/08/25, 10:58 </span>

    another simplification: this is reproducible without the dependency from site2 to site1, too:

    cat Sets/Site1/config.yaml 
    name: local/site1
    label: local/site1
    cat Sets/Site2/config.yaml 
    name: local/site2
    label: local/site2
    cat Sets/Site1/setup.typoscript 
    config.disableAllHeaderCode = 1
    page = PAGE
    page.10 = COA_INT
    page.10.10 = TEXT
    page.10.10.value = default
    
    [traverse(page, "uid") == 3]
      page.10.10.value = we are on page 3
    [end]
    cat Sets/Site2/setup.typoscript
    config.disableAllHeaderCode = 1
    page = PAGE
    page.10 = COA_INT
    page.10.10 = TEXT
    page.10.10.value = default
    
    [traverse(page, "uid") == 4]
      page.10.10.value = we are on page 4
    [end]
  4. Christian Kuhn commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-05-08T13:40:07+00:00" > 05/08/25, 13:40 </span>

    Applied in changeset commit:b2af105f264569912295113fa84a996f11926a5f.