Bug #79692
closedError when "Edit the whole template record"
100%
Description
When i click on "Edit the whole Template Record" in the backend, i currently get the following error:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: strtoupper() expects parameter 1 to be string, integer given | TypeError thrown in file /app/htdocs/typo3_src/typo3/sysext/backend/Classes/Form/FormDataProvider/EvaluateDisplayConditions.php in line 205. Requested URL
I guess that this happens because of the strict type check:
declare(strict_types=1);
...
$logicalOperator = strtoupper($logicalOperator);
if (($logicalOperator !== 'AND' && $logicalOperator !== 'OR') || !is_array($groupedDisplayConditions)) {
throw new \RuntimeException(
'Multiple conditions must have boolean operator "OR" or "AND", "' . $logicalOperator . '" given.',
1481380393
);
}
...
I think the value should be casted to string before passing it to strtoupper.
Updated by Georg Ringer almost 8 years ago
- Status changed from New to Needs Feedback
I can not reproduce that. can you test on a clean installation? is there something special in the record?
Updated by Timo Hund almost 8 years ago
Hi Georg,
i've investigated this further. I stumbled upon this issue by using t3kit with the latest TYPO3 master branch.
I think there are two issues:
The themese extension has an invalid displayCondition (typo3conf/ext/themes/Configuration/TCA/Overrides/sys_template.php):
'displayCond' => [
'FIELD:root:REQ:true'
],
Which should be from my undestanding:
'displayCond' => 'FIELD:root:REQ:true'
But nevertheless the ConditionParser does not come to the point to evaluate the operator because strtoupper fails on the wrong input type. I think the parser should cast the operator to string before checking if it is AND or OR.
Updated by Benni Mack almost 8 years ago
- Target version changed from 8.6 to 8 LTS
Updated by Thomas Deuling over 7 years ago
I can confirm that behaviour. So, for our themes extension we just fixed that TCA issue - see:
https://github.com/typo3-themes/themes/blob/8-0/Configuration/TCA/Overrides/sys_template.php#L10
Updated by Benni Mack over 7 years ago
- Target version changed from 8 LTS to Candidate for patchlevel
Updated by Alexander Opitz about 7 years ago
- Status changed from Needs Feedback to New
Updated by Gerrit Code Review about 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58480
Updated by Gerrit Code Review about 6 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58480
Updated by Benni Mack about 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset be13af7f2b9bb6d95e5005b9a305c75eb2d11275.
Updated by Gerrit Code Review about 6 years ago
- Status changed from Closed to Under Review
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58736
Updated by Benni Mack about 6 years ago
- Status changed from Under Review to Resolved
Applied in changeset 016a3145ec0f199a73434d1a14ec9f4a6fc7cf81.