Index: typo3/alt_doc.php =================================================================== --- typo3/alt_doc.php (Revision 8801) +++ typo3/alt_doc.php (Arbeitskopie) @@ -1094,9 +1094,9 @@ $fetchFields = 'uid,'.$languageField.','.$transOrigPointerField; // get record in current language - $rowCurrent = t3lib_befunc::getLiveVersionOfRecord($table, $uid, $fetchFields); + $rowCurrent = t3lib_BEfunc::getLiveVersionOfRecord($table, $uid); if (!is_array($rowCurrent)) { - $rowCurrent = t3lib_befunc::getRecord($table, $uid, $fetchFields); + $rowCurrent = t3lib_BEfunc::getRecord($table, $uid); } $currentLanguage = $rowCurrent[$languageField]; @@ -1104,9 +1104,9 @@ if ($currentLanguage>-1) { // Disabled for records with [all] language! // get record in default language if needed if ($currentLanguage) { - $rowsByLang[0] = t3lib_befunc::getLiveVersionOfRecord($table, $rowCurrent[$transOrigPointerField], $fetchFields); + $rowsByLang[0] = t3lib_BEfunc::getLiveVersionOfRecord($table, $rowCurrent[$transOrigPointerField]); if (!is_array($rowsByLang[0])) { - $rowsByLang[0] = t3lib_befunc::getRecord($table, $rowCurrent[$transOrigPointerField], $fetchFields); + $rowsByLang[0] = t3lib_BEfunc::getRecord($table, $rowCurrent[$transOrigPointerField]); } } else { $rowsByLang[0] = $rowCurrent; @@ -1133,10 +1133,11 @@ $newTranslation = isset($rowsByLang[$lang['uid']]) ? '' : ' ['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.new',1).']'; // create url for creating a localized record - if($newTranslation) { + if ($newTranslation) { + $uidOfDefaultLanguage = ($rowsByLang[0]['pid'] < 0 ? $rowsByLang[0]['t3ver_oid'] : $rowsByLang[0]['uid']); $href = $this->doc->issueCommand( - '&cmd['.$table.']['.$rowsByLang[0]['uid'].'][localize]='.$lang['uid'], - $this->backPath.'alt_doc.php?justLocalized='.rawurlencode($table.':'.$rowsByLang[0]['uid'].':'.$lang['uid']).'&returnUrl='.rawurlencode($this->retUrl) + '&cmd[' . $table . '][' . $uidOfDefaultLanguage . '][localize]=' . $lang['uid'], + $this->backPath . 'alt_doc.php?justLocalized=' . rawurlencode($table . ':' . $uidOfDefaultLanguage . ':' . $lang['uid']) . '&returnUrl=' . rawurlencode($this->retUrl) ); // create edit url