Bug #103472
closedPHP Warning: Undefined array key "items" in DataHandler.php line 2351
100%
Description
This is an edge case, which happens with the constellation below:
Content Element A has a field of type "radio".
This field has not "items" set directly, but through "columnsOverrides" for this specific type "A".
Unrelated Content Element B is translated from default language to another language.
Translation spinner spins endlessly. In the background the PHP warning was triggered.
The reason is the DataHandler context for the translation is Content Element B. So the "record type" B is used to retrieve "columnsOverrides" for "types". Thus resulting in empty "items" for type "radio". DataHandler method "checkValueForRadio" does not have a safety net for missing "items".
A fix could be to set "items" to an empty array if not defined or not an array. This would also ensure an array is passed to "$processingService->getProcessingItems" some lines below.
Updated by Gerrit Code Review 8 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/+/83575
Updated by Gerrit Code Review 8 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/+/83575
Updated by Gerrit Code Review 7 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83899
Updated by Gerrit Code Review 7 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/+/83575
Updated by Gerrit Code Review 7 months ago
Patch set 2 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83899
Updated by Gerrit Code Review 7 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/+/83575
Updated by Nikita Hovratov 7 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset db6df19d8fed232ac7ae305719e9084eff324ea9.