Issue Bug Under Review

#101903Workspaces: Subpage of to-be-deleted page cannot be moved.

Hannes Lau 09/12/23, 16:11 updated 11/19/26, 06:58

Description

Consider the following page structure:

  • New parent page
  • Old parent page
    • Subpage

Within a workspace, move “Subpage” into “New parent page” and delete “Old parent page”. Publish the workspace.

Expected:
  • “Subpage” is now a child of “New parent page”
  • “Old parent page” will be deleted
Actual:
  • “Subpage” is deleted
  • “Old parent page” is deleted

Reviews 1

History 36

  1. Hannes Lau commented <span data-processor="relativetime" data-value="2024-03-06T15:27:27+00:00" > 03/06/24, 15:27 </span>

    I currently use this patch:

    diff --git a/www/patches/typo3/cms-workspaces/delete-after-move.patch b/www/patches/typo3/cms-workspaces/delete-after-move.patch
    new file mode 100644
    index 0000000..f964ea7
    --- /dev/null
    +++ b/www/patches/typo3/cms-workspaces/delete-after-move.patch
    @@ -0,0 +1,17 @@
    +Index: Classes/Service/WorkspaceService.php
    +IDEA additional info:
    +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    +<+>UTF-8
    +===================================================================
    +diff --git a/Classes/Service/WorkspaceService.php b/Classes/Service/WorkspaceService.php
    +--- a/Classes/Service/WorkspaceService.php
    ++++ b/Classes/Service/WorkspaceService.php     (date 1694530053792)
    +@@ -269,7 +269,7 @@
    +                 }
    +                 unset($newRecord);
    +                 $moveRecs = $this->getMovedRecordsFromPages($table, $pageList, $wsid, $stage);
    +-                $recs = array_merge($recs, $newRecords, $moveRecs);
    ++                $recs = array_merge($newRecords, $moveRecs, $recs);
    +                 $recs = $this->filterPermittedElements($recs, $table);
    +                 if (!empty($recs)) {
    +                     $output[$table] = $recs;

    Would this be a candidate for a merge request?

  2. Riccardo De Contardi commented <span data-processor="relativetime" data-value="2024-08-17T16:28:27+00:00" > 08/17/24, 16:28 </span>

    Still happens on both TYPO3 12 and 13 (latest main)