Index: t3lib/class.t3lib_tcemain.php =================================================================== --- t3lib/class.t3lib_tcemain.php (revision 7247) +++ t3lib/class.t3lib_tcemain.php (working copy) @@ -3664,10 +3664,17 @@ // move the records if (isset($dbAnalysis)) { + $destinationPid = $destPid; + // If the children records are linked directly to the page record, + // their pid should stay unchanged, otherwise they will find themselves + // attached to the new parent page of the page being moved + if ($table == 'pages') { + $destinationPid = $uid; + } // Moving records to a positive destination will insert each // record at the beginning, thus the order is reversed here: foreach (array_reverse($dbAnalysis->itemArray) as $v) { - $this->moveRecord($v['table'],$v['id'],$destPid); + $this->moveRecord($v['table'], $v['id'], $destinationPid); } } }