Project

General

Profile

Bug #103472

Updated by Nikita Hovratov about 2 months ago

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.

Back