Project

General

Profile

Actions

Bug #98053

closed

TypoScript: getData spams logfile if value in site config is missing

Added by Andreas Kiessling almost 2 years ago. Updated about 1 month ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2022-07-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

https://github.com/TYPO3/typo3/blob/f824c51cc1/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php#L4284


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #99465: Accessing site configuration via TypoScript getData triggers a warning when configuration option does not existClosed2023-01-05

Actions
Actions

Also available in: Atom PDF