Project

General

Profile

Actions

Bug #103472

closed

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

Added by Nikita Hovratov about 1 month ago. Updated 4 days ago.

Status:
Resolved
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 about 1 month ago

  • Description updated (diff)
Actions #2

Updated by Gerrit Code Review about 1 month 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 about 1 month 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 5 days 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 5 days 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 5 days 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 4 days 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 4 days ago

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

Also available in: Atom PDF