Project

General

Profile

Actions

Bug #90060

closed

Extending Site configuration TCA with any select-type field does not handle selected values

Added by Claus Due almost 5 years ago. Updated almost 3 years ago.

Status:
Rejected
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-01-06
Due date:
% Done:

0%

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

Description

Problem:

Extending the pseudo-TCA configuration for "Sites" module to add a field of type "select" with multiple options allowed will not render the field with selected values.

Cause:

An explicit check for saved values NOT being an array is implemented, causing any array-like value to be completely ignored

Reasoning:

Given that:

  • Select-type fields with multiple possible options are possible
  • Such values, when saved to site configuration, are possible to store
  • The lack of "selected" status on all options causes second and subsequent saving of form to null such fields' values

I conclude that:

  • We should not be intentionally ignoring array-like values

Solution:

  • Removing the `!is_array` check makes multi-option select fields work correctly
  • This in turn means the entire loop can be replaced with an array union
Actions

Also available in: Atom PDF