#45873querySettings setRespectSysLanguage or setSysLanguageUid does not work
Description
Hello,
currently its not possible to get a translated record after update from 4.7 to 6.0 or 6.1. This was working in 4.7:
$query = $this->createQuery();
$query->getQuerySettings()->setRespectSysLanguage(false);
$result = $query->matching(
$query->logicalAnd($query->equals('sys_language_uid', $translatedLangUid), $query->equals('l10n_parent', $uidOfDefaultLang)))
->execute();
$myObject = $result->getFirst();
In 6.x its currently impossible to get the translated record with the data query, because the function in typo3DBbackend.php doLanguageAndWorkspaceOverlay() always overlays the record with the default language record.
If I try to set setSysLanguageUid($translatedLangUid) then I get the translated record but weirdly the UID gets overwritten with the default language UID and inside of the object I find _localizedUid and _languageUid. As I can’t reach this two attributes I have no idea how to correctly update or add the object into my repository.
As in 4.7 I could get this working I think it is a bug, or some major changes happens where I couldn’t find any information.
Regards,
Dominic
Reviews 4
- main 75103[BUGFIX] Do not overlay languages when using "setRespectSysLanguage(false)"
- TYPO3_8-7 58357[TASK] Provide more tests for Extbase rendering in languages
- main 58276[TASK] Provide more tests for Extbase rendering in languages
- main 21744[BUGFIX] False SetRespectSysLanguage shouldn't provoke overlaying
Related issues 5
- Bug #32216OrderBy on translated records doesn't work properly
- Bug #47192setRespectSysLanguage(FALSE) doesn't prevent language overlay when fetching localized objects
- Bug #56855Extbase tries to overlay pages_language_overlay records
- Bug #59992Persistence session doesn't take overlays into account
- Bug #86405querySetting setRespectSysLanguage (wrong implementation of "strict"-mode)