Index: typo3/sysext/core/Classes/Database/RelationHandler.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- typo3/sysext/core/Classes/Database/RelationHandler.php (revision 895e23d252e30452d6015bbe1fc81f1c1204a70d) +++ typo3/sysext/core/Classes/Database/RelationHandler.php (revision ) @@ -418,7 +418,11 @@ // Get ID as the right value: $theID = $this->secondTable ? abs((int)$theID) : (int)$theID; // Register ID/table name in internal arrays: + if ($theTable !== '' && $theTable !== '_NO_TABLE') { + $this->itemArray[$key]['id'] = $this->getLiveDefaultId($theTable, $theID); + } else { - $this->itemArray[$key]['id'] = $theID; + $this->itemArray[$key]['id'] = $theID; + } $this->itemArray[$key]['table'] = $theTable; $this->tableArray[$theTable][] = $theID; // Set update-flag: @@ -442,12 +446,7 @@ } // Fetch live record data - if ($this->useLiveReferenceIds) { - foreach ($this->itemArray as &$item) { - $item['id'] = $this->getLiveDefaultId($item['table'], $item['id']); - } - // Directly overlay workspace data - } else { + if (!$this->useLiveReferenceIds) { $this->itemArray = array(); $foreignTable = $configuration['foreign_table']; $ids = $this->getResolver($foreignTable, $this->tableArray[$foreignTable])->get();