Bug #82161
closedExtbase Change of behaviour when fetching translated records between v7 and v8
100%
Description
In TYPO3 v7.6 the repository method findAll()
and TS configuration (but the same issue occurs with different TS settings):
config.sys_language_overlay = 0
config.sys_language_mode =
SELECT `tt_content`.* FROM `tt_content` `tt_content` WHERE 1 = 1 AND (tt_content.sys_language_uid IN (3 , - 1) OR (tt_content.sys_language_uid = 0 AND tt_content.uid NOT IN (SELECT tt_content.l18n_parent FROM tt_content WHERE tt_content.l18n_parent > 0 AND tt_content.sys_language_uid = 3 AND tt_content.deleted = 0) ) ) AND tt_content.pid IN (89) AND tt_content.deleted = 0 AND tt_content.t3ver_state <= 0 AND tt_content.pid <> - 1 AND tt_content.hidden = 0 AND tt_content.starttime <= 1503341940 AND (tt_content.endtime = 0 OR tt_content.endtime > 1503341940) AND (tt_content.fe_group = '' OR tt_content.fe_group IS NULL OR tt_content.fe_group = '0' OR FIND_IN_SET('0', tt_content.fe_group) OR FIND_IN_SET('-1', tt_content.fe_group))
while in v8 the query looks:
SELECT `tt_content`.* FROM `tt_content` `tt_content` WHERE ((`tt_content`.`sys_language_uid` IN (3 , - 1)) OR ((`tt_content`.`sys_language_uid` = 0) AND (`tt_content`.`uid` NOT IN (SELECT `tt_content`.`l18n_parent` FROM `tt_content` WHERE (`tt_content`.`l18n_parent` > 0) AND (`tt_content`.`sys_language_uid` = 3) AND ((`tt_content`.`deleted` = 0) AND (`tt_content`.`hidden` = 0) AND (`tt_content`.`starttime` <= 1503404340) AND ((`tt_content`.`endtime` = 0) OR (`tt_content`.`endtime` > 1503404340))))))) AND (`tt_content`.`pid` = 89) AND ((`tt_content`.`deleted` = 0) AND (`tt_content`.`t3ver_state` <= 0) AND (`tt_content`.`pid` <> - 1) AND (`tt_content`.`hidden` = 0) AND (`tt_content`.`starttime` <= 1503404340) AND ((`tt_content`.`endtime` = 0) OR (`tt_content`.`endtime` > 1503404340)) AND (((`tt_content`.`fe_group` = '') OR (`tt_content`.`fe_group` IS NULL) OR (`tt_content`.`fe_group` = '0') OR (FIND_IN_SET('0', `tt_content`.`fe_group`)) OR (FIND_IN_SET('-1', `tt_content`.`fe_group`)))))
note the additional where conditions in th v8 subselect:
AND (`tt_content`.`hidden` = 0) AND (`tt_content`.`starttime` <= 1503404340) AND ((`tt_content`.`endtime` = 0) OR (`tt_content`.`endtime` > 1503404340))))))) <pre>
Updated by Tymoteusz Motylewski over 7 years ago
seems the issue is in Typo3DbQueryParser.php->getSysLanguageStatement
Updated by Tymoteusz Motylewski over 7 years ago
What does it mean:
Having a record which is translated, and translation is hidden.
in V7: a record with hidden translation is not shown (neither record from default lang nor translated one)
in V8: a record from default language is shown
Updated by Gerrit Code Review about 7 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/53796
Updated by Gerrit Code Review about 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53796
Updated by Gerrit Code Review about 7 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53820
Updated by Tymoteusz Motylewski about 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c166659f053b9d1b8c8f7e79b755fcdcd88ec8f5.