Bug #91141

Exception in Template module with parsing constant comments

Added by Riny van Tiggelen 7 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-04-20
Due date:
% Done:

0%

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

Description

If you have defaultTypoScript_constants defined in the LocalConfiguration, it's possible that the Template backend module throws an exception while trying to parse the constant comments:

trim() expects parameter 1 to be string, null given

in /var/www/html/public/typo3/sysext/core/Classes/TypoScript/Parser/ConstantConfigurationParser.php line 296

I'm not exactly sure where this went wrong, since the parsing of these constants have changed quite a bit in CMS10.

The only thing I see is that the isset() check has been removed, in CMS9:
https://github.com/TYPO3/TYPO3.CMS/blob/v9.5.15/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php#L992-L994
in CMS10:
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/TypoScript/Parser/ConstantConfigurationParser.php#L298

Not sure if it has something to do with the defaultTypoScript_constants or that it's just the check that goes wrong (and it's enough to restore the isset check).

#1

Updated by Georg Ringer 7 months ago

  • Status changed from New to Needs Feedback

thanks for creating the issue. can you please add your configuration of defaultTypoScript_constants and in which module this warning occurs?

please also test with latest master as I couldn't reproduce it just now.

thanks

#2

Updated by Georg Ringer 2 months ago

  • Status changed from Needs Feedback to Closed

closing because of lack of feedback. feel free to contact me on slack or open a new issue if still relevant

Also available in: Atom PDF