Bug #82283
closedList module with Localization View and search does not work as aspected
100%
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
Updated by Christian Eßl about 5 years ago
Looks like this problem is already fixed in TYPO3 9.5.
Updated by Gerrit Code Review over 4 years 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
Updated by Susanne Moog over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f4dd544c926064370e163ad7ec8655e32f5d2029.