Bug #89304
closedDisplayCond with field sys_language_uid on pages records not working
0%
Description
I encountered a problem using displayCond with sys_language_uid on pages fields.
When I use FIELD:sys_language_uid:=:0 to show a field only if it’s the default page record the field doesn’t get displayed at all (default or localizations).
If I use :<=:0 or :<:1 it’s working. This is just the case for pages records. The same dispayCond is working for e.g. tt_content.
It seems that this happens because $result['databaseRow']['sys_language_uid] is an empty array due to an empty items array in $result['processedTca'] which gets processed in TcaSelectItems.
Here is the relevant part which evaluates the DisplayCond with the corresponding values:
$operand = '='; // used operand in the DisplayCond
$fieldValue = []; // this is the value of sys_language_uid in this case
// Relevant evaluation in EvaluateDisplayConditions
if (is_array($fieldValue) && count($fieldValue) <= 1) {
$fieldValue = array_shift($fieldValue);
}
$result = $fieldValue == $operand;
var_dump($result); // bool(false)
Updated by Georg Ringer over 4 years ago
- Status changed from New to Accepted
- Target version set to Candidate for patchlevel
Updated by Oliver Bartsch over 3 years ago
Fixed for current master in #57082. The sys_language_uid
field is not longer a select field and therefore not longer processed by TcaSelectItems
.
Updated by Georg Ringer over 2 years ago
- Related to Feature #57082: Centralize languageField / sys_language_uid dropdown generation added
Updated by Georg Ringer over 2 years ago
- Status changed from Accepted to Closed
closed as solved and no backport for older versions will happen