[BUGFIX] Don't respect sys_language in Backends getObjectByIdentifier
authorMarc Bastian Heinrichs <typo3@mbh-software.de>
Thu, 25 Apr 2013 15:56:25 +0000 (17:56 +0200)
committerAlexander Schnitzler <typo3@alexanderschnitzler.de>
Sun, 28 Apr 2013 08:38:47 +0000 (10:38 +0200)
Since the PropertyMapper (on mapping persisted objects) and
the method findByUid of class Repository uses getObjectByIdentifier to
fetch persisted objects and does not create queries on their own any
more the underlying method in Backend must not respect the sysLanguage
to not break the current behaviour.
Adding this setting seems not having any side effects because the method
was only used by the rewritten PropertyMapper.

Fixes: #47585
Fixes: #47586
Relates: #47251
Releases: 6.2, 6.1
Change-Id: I009f8112dd3d96275930132865c0fe5aeb3835f1
Reviewed-on: https://review.typo3.org/20165
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Reviewed-by: Alexander Schnitzler
Tested-by: Alexander Schnitzler
typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php

index ad2f8d5..41f907d 100644 (file)
@@ -267,6 +267,7 @@ class Backend implements \TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface
                } else {
                        $query = $this->persistenceManager->createQueryForType($className);
                        $query->getQuerySettings()->setRespectStoragePage(FALSE);
+                       $query->getQuerySettings()->setRespectSysLanguage(FALSE);
                        return $query->matching($query->equals('uid', $identifier))->execute()->getFirst();
                }
        }