#105174Type error for GeneralUtility::trimExplode() called in AbstractAstBuilder on frontend request if value modification "removeFromList" is used
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.
Reviews 1
Related issues 2
History 49
-
Gerrit Code Review pushed patch set 1 for main to change 86394 status
NewUnder Review <span data-processor="relativetime" data-value="2024-10-01T15:35:58+00:00" > 10/01/24, 15:35 </span> -
Christian Kuhn changed Related to #97816 <span data-processor="relativetime" data-value="2024-10-02T10:00:32+00:00" > 10/02/24, 10:00 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 86394 <span data-processor="relativetime" data-value="2024-10-02T10:00:50+00:00" > 10/02/24, 10:00 </span>
-
Christian Kuhn changed Related to #101453 <span data-processor="relativetime" data-value="2024-10-02T10:02:41+00:00" > 10/02/24, 10:02 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 86394 <span data-processor="relativetime" data-value="2024-10-02T10:02:53+00:00" > 10/02/24, 10:02 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 86394 <span data-processor="relativetime" data-value="2024-10-02T20:37:09+00:00" > 10/02/24, 20:37 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 86394 <span data-processor="relativetime" data-value="2024-10-15T09:50:19+00:00" > 10/15/24, 09:50 </span>
-
Karsten Nowak (undkonsorten) commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2024-10-15T10:15:07+00:00" > 10/15/24, 10:15 </span> -
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:32:49+00:00" > 12/02/25, 14:32 </span>
Applied in changeset commit:3585b1a2903f3c036db7c29c46b1794578af81cd.