#98053TypoScript: getData spams logfile if value in site config is missing
Description
I extend the site configuration with custom fields like Google TagManager ID etc, stuff that you previously used to put in some site specific constants.
When i access this value via TS however, i get a warning in the log if the value is not set. This might very well happen in multidomain setups when not each site has the same config.
Example:
page {
meta {
facebook-domain-verification.data = site:facebookDomainVerification
I also can not add an if.isTrue.data since this throws the same warning.
Accessing site: values is the only place in getData that creates a warning, while all other places either fail silently or just output an empty string. So IMHO the behavior should be the same and just return nothing if the value is not set
Reviews 1
Related issues 1
History 6
-
Andreas Kienast changed Sprint Focus On Location Sprint 08/05/22, 09:02
-
Rémy DANIEL commented 08/05/22, 22:29
-
Oliver Hader changed Sprint Focus
On Location Sprint11/03/22, 09:04 -
Andreas Kießling changed Related to #99465 01/10/23, 14:19
-
Andreas Kießling commented 01/10/23, 14:20
Can be closed since this was downgraded to a notice in #99465
-
Riccardo De Contardi commented and changed status
NewClosed 04/14/24, 14:40Andreas Kiessling sorry for this late reply and thank you for your update!
I am closing this issue in agreement with the reporter.
If you think that this is the wrong decision please reopen it or open a new issue with a reference to this one.
Thank you.
The log was introduced with https://review.typo3.org/c/Packages/TYPO3.CMS/+/58947/ for a reason: to catch an exception and allow the developer to fix it.
Instead of silently returning an empty string, maybe the log level can just be lowered (notice instead of warning), or a E_USER_NOTICE can be issued.