[!!!][TASK] Execute remap handling of nested children earlier 91/31891/4
authorOliver Hader <oliver@typo3.org>
Mon, 28 Jul 2014 16:31:33 +0000 (18:31 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Tue, 7 Oct 2014 21:47:04 +0000 (23:47 +0200)
If dealing with nested parent-child-structures, it happens that
the proper UID of a record (either parent or child) has not been
persisted yet and therefore it's only a "NEW..." which will be
replaced in a later step during several "remapping" actions.

If copying a page with many sub-pages and sub-records this
remap action is processed very late. Results are invalid record
relations (like content elements now having duplicated images
since the remapping has not updated the real parent pointer yet).

This patch is marked with [!!!] since side-effects can appear.
In case this change gets merged and it turns out that DataHandling
got worse, it's target to be reverted again.

Resolves: #60654
Releases: master
Change-Id: I9dc77630e832e2b9ab65840daf44931640c6d816
Reviewed-on: http://review.typo3.org/31891
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index 1b47797..cfba316 100644 (file)
@@ -3200,6 +3200,7 @@ class DataHandler {
                                        $GLOBALS['TYPO3_DB']->sql_free_result($mres);
                                }
                        }
+                       $this->processRemapStack();
                        return $theNewRootID;
                }
        }