benjaminkott / benjaminkott/bootstrap_package
TypoScript Unexpected token "operator" of value "==" in CookieConsent/setup.typoscript causes SyntaxError in TYPO3 v13+
- Dominant language
- PHP
- Stars
- 355
- Forks
- 212
- Avg merge
- 1h 4m
- Merged PRs (30d)
- 31
Description
# Bug Report
In the file Configuration/TypoScript/CookieConsent/setup.typoscript, a TypoScript condition is written as:
`[{$page.theme.cookieconsent.enable} == 1]`
In TYPO3 v13+ (and already in v12+), this causes a syntax error:
`Wed, 11 Jun 2025 10:54:59 +0200 [ERROR] request="4d114e212bc64" component="TYPO3.CMS.Core.TypoScript.IncludeTree.Visitor.IncludeTreeConditionMatcherVisitor": TypoScript condition [ == 1] could not be parsed: Unexpected token "operator" of value "==" around position 2 for expression ` == 1`.- SyntaxError: Unexpected token "operator" of value "==" around position 2 for expression ` == 1`., in file /var/www/html/vendor/symfony/expression-language/Parser.php:286 - {"expression":" == 1","error":"Unexpected token \"operator\" of value \"==\" around position 2 for expression ` == 1`.",`
The error is logged on every request, which leads to:
- Constantly growing log file
- Disk space issues on some servers
# FIX:
`['{$page.theme.cookieconsent.enable}']
page {
includeJSFooterlibs {
# COOKIE CONSENT
contrib_cookieconsent = EXT:bootstrap_package/Resources/Public/Contrib/cookieconsent/cookieconsent.min.js
bootstrap_cookieconsent = EXT:bootstrap_package/Resources/Public/JavaScript/Dist/bootstrap.cookieconsent.min.js
}
}
[end]
`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with Configuration/TypoScript/CookieConsent/setup.typoscript and inspect the condition around the cookie-consent JavaScript includes. Confirm the condition follows the TYPO3 v13+ syntax shown in the issue, then verify that the TypoScript parses without the reported error and that the includes remain available when cookie consent is enabled.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100