Project

General

Profile

Actions

Bug #82161

closed

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

Added by Tymoteusz Motylewski over 7 years ago. Updated about 6 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 #1

Updated by Tymoteusz Motylewski over 7 years ago

seems the issue is in Typo3DbQueryParser.php->getSysLanguageStatement

Actions #2

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

Actions #3

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

Actions #4

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

Actions #5

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

Actions #6

Updated by Tymoteusz Motylewski about 7 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF