Issue Bug Closed

#105760Cached Settings in site configuration (multi domain setup)

David Hoeckele 12/04/24, 11:02 updated 12/02/25, 14:31

Description

Hey, i have a multidomain setup (v12 => v13 upgrade) with a settings.yaml for each site which contains some pids like

publication:
  detailPid: 123
  listPid: 456
  storagePid: 789

These settings are used in typoscript plugin config (and later in php/fluid):

plugin.tx_customer_publication {
    settings {
        listPid = {$publication.listPid}
        detailPid = {$publication.detailPid}
        storagePid = {$publication.storagePid}
    }
}

the first site get’s the correct site settings as expected, calling the second site afterwards it gets the same settings as the first site instead of it’s own custom settings, they seem to be cached.
I also made a testcase with a plain TYPO3 instance:
Created 2 site configs and add settings to site config (separated settings.yaml made no difference):

base: 'https://plain-typo3-13.ddev.site/autogenerated-1'
errorHandling: {  }
languages:
  -
    title: English
    enabled: true
    languageId: 0
    base: /
    locale: en_US.UTF-8
    navigationTitle: English
    flag: us
rootPageId: 1
routes: {  }
settings:
  testParam: 111

and

base: 'https://plain-typo3-13.ddev.site/autogenerated-2'
errorHandling: {  }
languages:
  -
    title: English
    enabled: true
    languageId: 0
    base: /
    locale: en_US.UTF-8
    navigationTitle: English
    flag: us
rootPageId: 2
routes: {  }
settings:
  testParam: 222

Created a typoscript template in backend on each root page to output the setting:

page = PAGE
page {
  typeNum = 0

  10 = TEXT
  10.value = {$testParam}
  10.insertData = 1
}

Calling first page returns 111, calling second page afterwards also returns 111 instead of 222.
I also have checked the cache/code/core/SiteSettings_* files, they look fine.

Reviews 4

History 1320

  1. Benjamin Franzke commented <span data-processor="relativetime" data-value="2024-12-05T10:41:03+00:00" > 12/05/24, 10:41 </span>

    Thanks for your report.

    One question in order to understand why you face this error with v13 and not with v12:

    Did you migrate from sys_template to site-sets in v13 (in that case I’m pretty sure that the error is a missing site-reference in the typoscript cache key [1]) or did you stay with sys_template records?

    [1] https://github.com/TYPO3/typo3/blob/v13.4.1/typo3/sysext/core/Classes/TypoScript/FrontendTypoScriptFactory.php#L339-L346

    Edit: Sorry, I just noticed that you wrote “Created a typoscript template in backend on each root page”, so you’re still using sys_template records. CC @lolli

  2. David Hoeckele commented <span data-processor="relativetime" data-value="2024-12-05T10:53:53+00:00" > 12/05/24, 10:53 </span>

    No, I did not migrate to site-sets (yet), i tried to stay with sys_template records.
    It’s a large TYPO3 with over 100 sites and a lots of special cases – so i’d prefer to stay with sys_template records for v13 (or is it not recommended to use it that way in v13?)

  3. Benjamin Franzke commented <span data-processor="relativetime" data-value="2024-12-05T15:42:29+00:00" > 12/05/24, 15:42 </span>

    Perfectly fine to stay with sys_template in v13, no intent to remove or deprecate that in nearest future.
    I actually only asked about that in order to isolate the root cause of the issue.

    We’ll try to have a look at this.

  4. Kevin Appelt commented <span data-processor="relativetime" data-value="2024-12-18T08:49:00+00:00" > 12/18/24, 08:49 </span>

    bfr We have the same issue using site sets.
    (see: https://typo3.slack.com/archives/C03AM9R17/p1734511495355159 - my slack message from today - 2024-12-18
    09:44am)

  5. Benjamin Franzke commented <span data-processor="relativetime" data-value="2024-12-18T12:00:37+00:00" > 12/18/24, 12:00 </span>

    Kevin Appelt wrote in #note-8:
    > bfr We have the same issue using site sets.
    > (see: https://typo3.slack.com/archives/C03AM9R17/p1734511495355159 - my slack message from today - 2024-12-18
    09:44am)

    That’s another issue, please create a separate ticket.
    Will be fixed a separate patch:
    > 87555: [WIP][BUGFIX] Respect per-site settings in TypoScript cache identifiers | https://review.typo3.org/c/Packages/TYPO3.CMS/+/87555

  6. Benjamin Franzke commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2024-12-19T11:55:10+00:00" > 12/19/24, 11:55 </span>

    Applied in changeset commit:a84e10c738f9d4f00be69d2d187cf257aea8b70e.