0

I’m having trouble overriding the TypoScript constants from a vendor extension (ameos/ameos-tarteaucitron) in TYPO3 v13.

I’ve included both TypoScript sets correctly under Sites → TypoScript, and the order looks like this:

  1. Ameos - Tarte Au Citron [ameos/ameos-tarteaucitron]

  2. Myproject [vendor/my-project]

So my sitepackage is included after the vendor extension.

In my sitepackage constants file packages/rrthdf/Configuration/Sets/SitePackage/constants.typoscript, I have the following:

ameos.tarteaucitron {
  privacyPid = 40
  orientation = bottom
  DenyAllCta = 1
  AcceptAllCta = 1
  handleBrowserDNTRequest = 0
  showIcon = 1

  services {
    gtag = 1
    gtag {
      gtagUa = G-XXXXXXXXX
    }
  }
}

However, these values are not applied.

In vendor/ameos/ameos_tarteaucitron/Configuration/TypoScript/constants.typoscript

we have this :

ameos {
    tarteaucitron {
        gtag = 0
            gtag {
                #cat=plugin.ameos_tarteaucitron.services.stats; type=string; label=Google Analytics Account (gtag.js)
                gtagUa =
            }

   }
}

after clearing all caches and cookies, the override from my sitepackage still doesn’t seem to take effect. Is there anything special about how this extension loads its constants in TYPO3 v13? Do I need to use a specific include method or naming pattern for the override to work?

1 Answer 1

1

The order of the Sets in Sites → TypoScript does not matter. It is simply a list - without any logical order.

For dependencies between Sets, you have to define this dependency in the set which requires another.

The Set 'vendor/my-project' has to declare it:

name: vendor/my-project
label: My project

dependencies:
  - ameos/ameos-tarteaucitron

TYPO3 Explained

Line 7: Dependencies Load setup.typoscript, constants.typoscript, page.tsconfig and config.yaml from the site set definitions of this or other extensions. These dependencies are loaded before your own site set. For example a dependency to a site set definition in your own site package and/or a dependency to a site set definition from another provider (vendor). A non-existing dependency makes the whole site set report failures.

side note: SiteSettings

Related to this question is another case: if a third-party extension uses settings (instead of constants), there can be used like constants in TypoScript. But for overwriting them, you have to set a setting. Overwriting by setting a constant won't work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.