Project

General

Profile

Actions

Bug #105174

closed

Type error for GeneralUtility::trimExplode() called in AbstractAstBuilder on frontend request if value modification "removeFromList" is used

Added by Karsten Nowak (undkonsorten) about 2 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-10-01
Due date:
% Done:

100%

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

Description

Sometimes, $originalValue is null in evaluateValueModifier function in TYPO3\CMS\Core\TypoScript\AST\AbstractAstBuilder.php

(1/1) TypeError
TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(): Argument #2 ($string) must be of type string, null given, called in /app/vendor/typo3/cms-core/Classes/TypoScript/AST/AbstractAstBuilder.php on line 229

I'm using

TCEFORM.tt_content {
  CType {
    removeItems := removeFromList(menu_section)
  }
}

in my TS-Config. I'm using 2 different files for TS-Config. First file (file-A) is included in root page (Page-A) of the website. Second (file-B) is included on a subpage (Subpage-B).

In file-A removeItems property is already set and have some CType values they should be removed. In file-B one CType should be allowed on the subpages.
If I use this structure of included TS-Config (seems absolutely correct for me), the removeItems property is not set by the file-A if a frontend request of
Subpage-B is taken.

$orignalValue in evaluateValueModifier in AbstractAstBuilder.php is null.

If I go to the backend to show the active TS-Config for Subpage-B there is no problem, no error. Everything works. Only the frontend request throws an error.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #97816: New TypoScript parserClosed2022-06-27

Actions
Related to TYPO3 Core - Task #101453: Add native type declarations to GU array methodsClosedOliver Klee2023-07-26

Actions
Actions #1

Updated by Gerrit Code Review about 2 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86394

Actions #2

Updated by Christian Kuhn about 2 months ago

Actions #3

Updated by Gerrit Code Review about 2 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86394

Actions #4

Updated by Christian Kuhn about 2 months ago

  • Related to Task #101453: Add native type declarations to GU array methods added
Actions #5

Updated by Gerrit Code Review about 2 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86394

Actions #6

Updated by Gerrit Code Review about 2 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86394

Actions #7

Updated by Gerrit Code Review about 1 month ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86394

Actions #8

Updated by Karsten Nowak (undkonsorten) about 1 month ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF