Bug #82161

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

Added by Tymoteusz Motylewski over 2 years ago. Updated about 1 year ago.

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

100%

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>

Associated revisions

Revision c166659f (diff)
Added by Tymoteusz Motylewski over 2 years ago

[BUGFIX] Make extbase language handling consistent with TYPO3 v7

During doctrine migration a change of behaviour was introduced.
In v7 when a translated record is hidden, it's not shown,
while before this patch, a record from default language was shown.

Resolves: #82161
Releases: master, 8.7
Change-Id: Ib8127eff7218f9dd064febbab4956af44f3164b9
Reviewed-on: https://review.typo3.org/53796
Tested-by: TYPO3com <>
Reviewed-by: Henning Liebe <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

Revision 9e88b307 (diff)
Added by Tymoteusz Motylewski over 2 years ago

[BUGFIX] Make extbase language handling consistent with TYPO3 v7

During doctrine migration a change of behaviour was introduced.
In v7 when a translated record is hidden, it's not shown,
while before this patch, a record from default language was shown.

Resolves: #82161
Releases: master, 8.7
Change-Id: Ib8127eff7218f9dd064febbab4956af44f3164b9
Reviewed-on: https://review.typo3.org/53820
Tested-by: TYPO3com <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

History

#1 Updated by Tymoteusz Motylewski over 2 years ago

seems the issue is in Typo3DbQueryParser.php->getSysLanguageStatement

#2 Updated by Tymoteusz Motylewski over 2 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

#3 Updated by Gerrit Code Review over 2 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

#4 Updated by Gerrit Code Review over 2 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

#5 Updated by Gerrit Code Review over 2 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

#6 Updated by Tymoteusz Motylewski over 2 years ago

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

#7 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF