--- class.t3lib_tcemain.orig.php 2010-06-16 15:51:39.000000000 +0100 +++ class.t3lib_tcemain.php 2010-06-16 15:52:58.000000000 +0100 @@ -4751,6 +4751,8 @@ 'swapVersion'=>$swapVersion ))); + $swapVersion['pid'] = intval($curVersion['pid']); // Set pid for ONLINE + // Find fields to keep $keepFields = $this->getUniqueFields($table); if ($TCA[$table]['ctrl']['sortby']) { @@ -4775,7 +4777,6 @@ // Modify offline version to become online: $tmp_wsid = $swapVersion['t3ver_wsid']; - $swapVersion['pid'] = intval($curVersion['pid']); // Set pid for ONLINE $swapVersion['t3ver_oid'] = 0; // We clear this because t3ver_oid only make sense for offline versions and we want to prevent unintentional misuse of this value for online records. $swapVersion['t3ver_wsid'] = $swapIntoWS ? ($t3ver_state['swapVersion']>0 ? $this->BE_USER->workspace : intval($curVersion['t3ver_wsid'])) : 0; // In case of swapping and the offline record has a state (like 2 or 4 for deleting or move-pointer) we set the current workspace ID so the record is not deselected in the interface by t3lib_BEfunc::versioningPlaceholderClause() $swapVersion['t3ver_tstamp'] = $GLOBALS['EXEC_TIME'];