Bug #71621

Change in PageRepository breaks overlaying of universal language records

Added by Joschi Kuphal over 4 years ago. Updated over 1 year ago.

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

100%

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 possible Closed 2012-07-13
Related to TYPO3 Core - Bug #78639: Localizing Records with language "All" impossible Closed 2016-11-10

Associated revisions

Revision c2a32488 (diff)
Added by Mathias Schreiber over 4 years ago

[BUGFIX] Allow overlaying of records for all languages again

Return records with sys_language_uid=-1 untouched instead of
completely dropping them.

This is actually a problem up higher in the calling stack but
should be fixed properly in the near future.

Resolves: #71621
Releases: master
Change-Id: Ib39f200d4a4cb6ee538f45e0bccca845f10e1e16
Reviewed-on: https://review.typo3.org/44941
Reviewed-by: Joschi Kuphal <>
Tested-by: Joerg Kummer <>
Reviewed-by: Oliver Hader <>
Tested-by: Oliver Hader <>

History

#1 Updated by Mathias Brodala over 4 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 over 4 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 over 4 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 over 4 years ago

Hi,
I have the same issue already in 7.5.

Regards
Karl-Heinz

#5 Updated by David Frerich over 4 years ago

this is a big problem for our projects

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

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

#10 Updated by Joschi Kuphal over 4 years ago

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

#11 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF