Project

General

Profile

Actions

Bug #103472

closed

PHP Warning: Undefined array key "items" in DataHandler.php line 2351

Added by Nikita Hovratov 8 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-03-23
Due date:
% Done:

100%

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

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.

Actions #1

Updated by Nikita Hovratov 8 months ago

  • Description updated (diff)
Actions #2

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

Actions #3

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

Actions #4

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

Actions #5

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

Actions #6

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

Actions #7

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

Actions #8

Updated by Nikita Hovratov 7 months ago

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

Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF