Project

General

Profile

Actions

Bug #89304

closed

DisplayCond with field sys_language_uid on pages records not working

Added by Oliver Bartsch over 4 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Start date:
2019-09-29
Due date:
% Done:

0%

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

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)

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #57082: Centralize languageField / sys_language_uid dropdown generationClosed2014-03-19

Actions
Actions #1

Updated by Georg Ringer about 4 years ago

  • Status changed from New to Accepted
  • Target version set to Candidate for patchlevel
Actions #2

Updated by Oliver Bartsch about 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.

Actions #3

Updated by Georg Ringer almost 2 years ago

  • Related to Feature #57082: Centralize languageField / sys_language_uid dropdown generation added
Actions #4

Updated by Georg Ringer almost 2 years ago

  • Status changed from Accepted to Closed

closed as solved and no backport for older versions will happen

Actions

Also available in: Atom PDF