Project

General

Profile

Actions

Bug #82283

closed

List module with Localization View and search does not work as aspected

Added by Gianluca Strafella over 6 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2017-09-04
Due date:
% Done:

100%

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

Description

Hi,
when I use list module and the localziation view is active, this "where" condition is added:

(`sys_language_uid` <= 0) OR (`l18n_parent` = 0)

in class TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList, aroud line 550

            if ($this->searchString === '') {
                $addWhere = (string)$queryBuilder->expr()->orX(
                    $queryBuilder->expr()->lte($GLOBALS['TCA'][$table]['ctrl']['languageField'], 0),
                    $queryBuilder->expr()->eq($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], 0)
                );
            }

but if exists an implementation for hook:

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['getTable']

and that implementation adds an additional where condition to where, then the final where will be:

(`tt_content`.`pid` = 72) AND ((`sys_language_uid` <= 0) OR (`l18n_parent` = 0) *AND MYCOLUMN <> AVALUE* ) AND ((`tt_content`.`deleted` = 0) AND ((`tt_content`.`t3ver_wsid` = 0) OR (`tt_content`.`t3ver_state` <= 0)))

The final "where" is wrong, because it's not respected the logical operators priority.
In this conditions, hook is unuseful.

Condition:

(`sys_language_uid` <= 0) OR (`l18n_parent` = 0)

should be:

((`sys_language_uid` <= 0) OR (`l18n_parent` = 0))

Could you fix the problem ?

Thanks,
Gianluca

Actions

Also available in: Atom PDF