Bug #71621

Change in PageRepository breaks overlaying of universal language records

Added by Joschi Kuphal almost 6 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2015-11-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
Complexity:
easy
Is Regression:
Yes
Sprint Focus:

Description

For whatever reasons a change was made in PageRepository->getRecordOverlay(), effectively breaking the overlay of records with sys_language_uid = -1.

TYPO3 7.5 (typo3/sysext/frontend/Classes/Page/PageRepository.php line 488):

// Must be default language or [All], otherwise no overlaying:
if ($row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] <= 0) {
    // ...
}

TYPO3 7.6 (typo3/sysext/frontend/Classes/Page/PageRepository.php line 484):

// Must be default language or [All], otherwise no overlaying:
if ((int)$row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] === 0) {
    // ...
}

Mind the comment: "... default language or [All]" — doesn't the comparison against === 0 explicitly exclude the all-languages setting?

The change completely breaks one of our sites, reverting the comparison back to <= 0 seems to fix it again however (at a first glance). There must have been a reason for this change though, right?


Related issues

Related to TYPO3 Core - Bug #38940: localization of "All languages" in listview possibleClosedMathias Schreiber2012-07-13

Actions
Related to TYPO3 Core - Bug #78639: Localizing Records with language "All" impossibleClosed2016-11-10

Actions
#1

Updated by Mathias Brodala almost 6 years ago

The comment is misleading since the change was about denying to create localization for "[All]" records, see #38940.

#2

Updated by Joschi Kuphal almost 6 years ago

@Mathias: I get your point. However, the problem is not the misleading comment but the fact that NO record at all will be returned in this case, not even the untouched universal-language record. So, even if your DB query returns a valid (all-languages) record, it will be swallowed during attempted language overlay. It's not possible to successfully retrieve these records from the DB like this as long as the table supports language overlay. Please correct me if I'm wrong (and show me how to do this properly in case we are missing something).

As a side note: We just upgraded a 7.5 installation that simply ran perfectly until the upgrade ...

#3

Updated by Andreas Dörler almost 6 years ago

Hi,

we see the very same problem. After upgrading to 7.6 LTS content elements with sys_language_uid=-1 are not shown in frontend.
Reverting to "<0" fixes the problem for us.

There are more people having this problem, please see:

King regards
Andreas

#4

Updated by Karl-Heinz Fischbach almost 6 years ago

Hi,
I have the same issue already in 7.5.

Regards
Karl-Heinz

#5

Updated by David Frerich almost 6 years ago

this is a big problem for our projects

#6

Updated by Gerrit Code Review almost 6 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/44941

#7

Updated by Gerrit Code Review almost 6 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/44941

#8

Updated by Gerrit Code Review almost 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44941

#9

Updated by Mathias Schreiber almost 6 years ago

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

Updated by Joschi Kuphal almost 6 years ago

Very happy to find this resolved "the right way", thanks. ;)

#11

Updated by Benni Mack almost 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF