Bug #82283

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

Added by Gianluca Strafella almost 4 years ago. Updated over 1 year 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

#1

Updated by Christian Eßl almost 2 years ago

Looks like this problem is already fixed in TYPO3 9.5.

#2

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63620

#3

Updated by Susanne Moog over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#4

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF