Allow CMS Author to duplicate a page

Created on 4 March 2025, 2 months ago

Overview

Clicking "Duplicate page" creates a duplicate of the page and immediately takes the user to the duplicated page, which title should be ā€œ{title} copy"

šŸ“Œ Task
Status

Active

Version

0.0

Component

Page builder

Created by

šŸ‡­šŸ‡ŗHungary attilatilman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @attilatilman
  • Merge request !7573510925: Allow user to duplicate a page. → (Merged) created by attilatilman
  • Pipeline finished with Failed
    2 months ago
    Total: 1288s
    #441966
  • šŸ‡§šŸ‡ŖBelgium wim leers Ghent šŸ‡§šŸ‡ŖšŸ‡ŖšŸ‡ŗ
  • šŸ‡§šŸ‡ŖBelgium wim leers Ghent šŸ‡§šŸ‡ŖšŸ‡ŖšŸ‡ŗ

    See the diagram → in ✨ The status badge should indicate if there are changes to the page Active .

    isNew is computed by this heuristic:

      private function contentEntityIsConsideredNew(string $current_entity_label, EntityTypeInterface $entity_type): bool {
        return $current_entity_label == ApiContentControllers::defaultTitle($entity_type);
      }
    

    +

      public static function defaultTitle(EntityTypeInterface $entity_type): TranslatableMarkup {
        return new TranslatableMarkup('Untitled @singular_entity_type_label', ['@singular_entity_type_label' => $entity_type->getSingularLabel()]);
      }
    

    Together, they mean that this code from this issue's MR:

     // Update title and status.
        $duplicate->set('title', $duplicate->label() . ' (Copy)');
        $duplicate->set('status', FALSE);
    

    … will never result in isNew: true for duplicates.

    That heuristic was introduced in ✨ The status badge should indicate if there are changes to the page Active 's BE MR. This MR will have to refine that heuristic.

  • Pipeline finished with Canceled
    2 months ago
    Total: 146s
    #444657
  • Pipeline finished with Failed
    2 months ago
    Total: 1356s
    #444662
  • Pipeline finished with Failed
    2 months ago
    Total: 1807s
    #444783
  • Pipeline finished with Failed
    2 months ago
    Total: 1324s
    #444895
  • Pipeline finished with Failed
    2 months ago
    Total: 1638s
    #445547
  • Pipeline finished with Failed
    2 months ago
    Total: 1160s
    #445599
  • Pipeline finished with Failed
    2 months ago
    Total: 866s
    #445611
  • Pipeline finished with Failed
    2 months ago
    Total: 449s
    #445624
  • Pipeline finished with Failed
    2 months ago
    Total: 1398s
    #445629
  • Pipeline finished with Failed
    2 months ago
    Total: 1643s
    #445786
  • Pipeline finished with Failed
    2 months ago
    Total: 1506s
    #445805
  • Pipeline finished with Failed
    2 months ago
    Total: 1449s
    #446480
  • First commit to issue fork.
  • Pipeline finished with Failed
    about 1 month ago
    #463486
  • šŸ‡§šŸ‡ŖBelgium wim leers Ghent šŸ‡§šŸ‡ŖšŸ‡ŖšŸ‡ŗ

    Given @larowlan's work on šŸ“Œ Include the preview HTML in the layout controller payload Active , I think he's probably best positioned to review this.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 10572s
    #464396
  • Pipeline finished with Failed
    about 1 month ago
    Total: 8500s
    #465648
  • Pipeline finished with Failed
    about 1 month ago
    #467401
  • Pipeline finished with Failed
    about 1 month ago
    Total: 574s
    #468289
  • Pipeline finished with Canceled
    about 1 month ago
    #468293
  • Pipeline finished with Failed
    about 1 month ago
    Total: 4931s
    #468322
  • First commit to issue fork.
  • šŸ‡¦šŸ‡ŗAustralia larowlan šŸ‡¦šŸ‡ŗšŸ.au GMT+10

    @attilatilman that test is passing locally for me, so I think it might just be a random fail
    I've merged origin/0.x and pushed to your branch

  • Pipeline finished with Running
    about 1 month ago
    #469122
  • Pipeline finished with Failed
    about 1 month ago
    Total: 1581s
    #471150
  • Pipeline finished with Failed
    about 1 month ago
    Total: 2430s
    #471215
  • Pipeline finished with Failed
    about 1 month ago
    Total: 1632s
    #471317
  • Pipeline finished with Failed
    about 1 month ago
    Total: 1625s
    #471404
  • šŸ‡¦šŸ‡ŗAustralia larowlan šŸ‡¦šŸ‡ŗšŸ.au GMT+10

    Looks good to me, gave it another review and a manual test

  • Pipeline finished with Failed
    30 days ago
    Total: 1686s
    #473234
  • Pipeline finished with Failed
    29 days ago
    Total: 1725s
    #473976
  • šŸ‡ŗšŸ‡øUnited States mglaman WI, USA

    Assigning to @wim-leers for "The change requests must be completed or resolved."

  • Pipeline finished with Skipped
    23 days ago
    #478673
  • First commit to issue fork.
  • Pipeline finished with Skipped
    23 days ago
    #478674
  • Pipeline finished with Skipped
    23 days ago
    #478676
  • Pipeline finished with Skipped
    23 days ago
    #478678
  • Pipeline finished with Skipped
    23 days ago
    #478679
  • Pipeline finished with Skipped
    23 days ago
    #478682
  • Pipeline finished with Skipped
    23 days ago
    #478684
  • Pipeline finished with Skipped
    23 days ago
    #478685
  • šŸ‡«šŸ‡®Finland lauriii Finland

    Did the honors to merge this given that we had code owner approvals.

  • šŸ‡§šŸ‡ŖBelgium wim leers Ghent šŸ‡§šŸ‡ŖšŸ‡ŖšŸ‡ŗ

    Seems like we missed an edge case here: šŸ› Page duplication in navigator results in blank title in editor panel Active .

  • Status changed to Fixed 7 days ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024