Revert "[BUGFIX] Set _localizedUid in OriginColumnName" 51/54551/4
authorHelmut Hummel <typo3@helhum.io>
Sat, 4 Nov 2017 00:59:24 +0000 (02:59 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Sat, 4 Nov 2017 18:45:11 +0000 (19:45 +0100)
This reverts commit 68e8530319faea18fbc61eee55fc00298582e8de.

The patch needs to be reverted due to wrong implementation.
The desired goal is not achievable at all with the current code base.

Reverts: #66535
Releases: master, 8.7
Change-Id: Ibd8eb7c4023d1b9f0e0de8b75d66193d66b89147
Reviewed-on: https://review.typo3.org/54551
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php

index c052a65..63ec1c4 100644 (file)
@@ -763,7 +763,7 @@ class Backend implements \TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface
         $dataMap = $this->dataMapper->getDataMap(get_class($parentObject));
         $columnMap = $dataMap->getColumnMap($propertyName);
         $parentUid = $parentObject->getUid();
-        if (!empty($parentObject->_getProperty('_localizedUid'))) {
+        if ($parentObject->_getProperty('_localizedUid') !== null) {
             $parentUid = $parentObject->_getProperty('_localizedUid');
         }
         $row = [
@@ -935,7 +935,7 @@ class Backend implements \TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface
         $row['uid'] = $object->getUid();
         if ($dataMap->getLanguageIdColumnName() !== null) {
             $row[$dataMap->getLanguageIdColumnName()] = (int)$object->_getProperty('_languageUid');
-            if (!empty($object->_getProperty('_localizedUid'))) {
+            if ($object->_getProperty('_localizedUid') !== null) {
                 $row['uid'] = $object->_getProperty('_localizedUid');
             }
         }
index e6af947..2e55f63 100644 (file)
@@ -233,7 +233,7 @@ class DataMapper implements \TYPO3\CMS\Core\SingletonInterface
         $dataMap = $this->getDataMap($className);
         $object->_setProperty('uid', (int)$row['uid']);
         $object->_setProperty('pid', (int)$row['pid']);
-        $object->_setProperty('_localizedUid', (int)$row[$dataMap->getTranslationOriginColumnName()]);
+        $object->_setProperty('_localizedUid', (int)$row['uid']);
         $object->_setProperty('_versionedUid', (int)$row['uid']);
         if ($dataMap->getLanguageIdColumnName() !== null) {
             $object->_setProperty('_languageUid', (int)$row[$dataMap->getLanguageIdColumnName()]);