Skip to content
Snippets Groups Projects
Commit 07bd3e31 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Use array_replace_recursive to merge columnsOverrides

Merging columnsOverrides into columns in FormEngine data provider
TcaColumnsOverrides is done via ArrayUtility::mergeRecursiveWithOverrule()
which supports the '__UNSET' feature to kick array parts from the
original array.
This is problematic since TCA should be additive only, for instance
the 'isloaded' display condition has been removed for that reason, too.
Specific issue is here that using __UNSET stops working if there is
a second mergeRecursiveWithOverrule() later, for instance in the
element expansion classes. This leads to hard to track issues and
almost always does not end up with a result a developer expects.
Solution is switching to php built-in array_replace_recursive() instead
which does not do __UNSET magic.
In general, always only add things to the columns array in columnsOverrides,
columns should have the common dominator of all overrides. Disabling of
specific features can be done only by adding a new key 'disableFoo' = true
or similar, the according TCA feature has to explicitely support that.

Change-Id: Ieba262c899ae2df2e3aa2c63d7dfa6b86e3fa4f4
Resolves: #80321
Releases: master
Reviewed-on: https://review.typo3.org/52074


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarHelmut Hummel <typo3@helhum.io>
Tested-by: default avatarHelmut Hummel <typo3@helhum.io>
Reviewed-by: default avatarMarkus Sommer <markussom@posteo.de>
Tested-by: default avatarMarkus Sommer <markussom@posteo.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 33102bd1
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment