Project

General

Profile

Actions

Bug #82161

closed

Extbase Change of behaviour when fetching translated records between v7 and v8

Added by Tymoteusz Motylewski over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-08-22
Due date:
% Done:

100%

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

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>

Actions

Also available in: Atom PDF