Bug #71621
closedChange in PageRepository breaks overlaying of universal language records
100%
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?
Updated by Mathias Brodala about 9 years ago
The comment is misleading since the change was about denying to create localization for "[All]" records, see #38940.
Updated by Joschi Kuphal about 9 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 ...
Updated by Andreas Dörler about 9 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.
- http://www.typo3.net/forum/thematik/zeige/thema/121257/
- http://www.typo3.net/forum/thematik/zeige/thema/121155/
- http://www.typo3forum.net/discussion/77071/77071-typo3-7-5-all-languages-funktioniert.html
King regards
Andreas
Updated by Karl-Heinz Fischbach about 9 years ago
Hi,
I have the same issue already in 7.5.
Regards
Karl-Heinz
Updated by David Frerich about 9 years ago
this is a big problem for our projects
Updated by Gerrit Code Review about 9 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
Updated by Gerrit Code Review about 9 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
Updated by Gerrit Code Review about 9 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
Updated by Mathias Schreiber about 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c2a324885f79d798082d51e1eda647cf05ba97a0.
Updated by Joschi Kuphal about 9 years ago
Very happy to find this resolved "the right way", thanks. ;)