--- typo3/sysext/core/Classes/Utility/RootlineUtility.php.org 2012-11-27 13:52:47.000000000 +0100 +++ typo3/sysext/core/Classes/Utility/RootlineUtility.php 2013-01-11 11:58:04.000000000 +0100 @@ -213,7 +213,7 @@ $this->pageContext->versionOL('pages', $row, FALSE, TRUE); $this->pageContext->fixVersioningPid('pages', $row); if (is_array($row)) { - $this->pageContext->getPageOverlay($row, $this->languageUid); + $row = $this->pageContext->getPageOverlay($row, $this->languageUid); $row = $this->enrichWithRelationFields($uid, $row); self::$pageRecordCache[$this->getCacheIdentifier($uid)] = $row; } @@ -244,7 +244,11 @@ } elseif ($configuration['foreign_field']) { $table = $configuration['foreign_table']; $field = $configuration['foreign_field']; - $whereClauseParts = array($field . ' = ' . intval($uid)); + if(intval($this->languageUid) > 0){ + $whereClauseParts = array($field . ' = ' . intval($pageRecord['_PAGES_OVERLAY_UID'])); + } else { + $whereClauseParts = array($field . ' = ' . intval($uid)); + } if (isset($configuration['foreign_match_fields']) && is_array($configuration['foreign_match_fields'])) { foreach ($configuration['foreign_match_fields'] as $field => $value) { $whereClauseParts[] = $field . ' = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($value, $table);