Allow CMS Author to duplicate a page

Created on 4 March 2025, about 1 month 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
  • Pipeline finished with Failed
    about 1 month 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
    29 days ago
    Total: 146s
    #444657
  • Pipeline finished with Failed
    29 days ago
    Total: 1356s
    #444662
  • Pipeline finished with Failed
    28 days ago
    Total: 1807s
    #444783
  • Pipeline finished with Failed
    28 days ago
    Total: 1324s
    #444895
  • Pipeline finished with Failed
    28 days ago
    Total: 1638s
    #445547
  • Pipeline finished with Failed
    28 days ago
    Total: 1160s
    #445599
  • Pipeline finished with Failed
    28 days ago
    Total: 866s
    #445611
  • Pipeline finished with Failed
    28 days ago
    Total: 449s
    #445624
  • Pipeline finished with Failed
    28 days ago
    Total: 1398s
    #445629
  • Pipeline finished with Failed
    27 days ago
    Total: 1643s
    #445786
  • Pipeline finished with Failed
    27 days ago
    Total: 1506s
    #445805
  • Pipeline finished with Failed
    27 days ago
    Total: 1449s
    #446480
  • First commit to issue fork.
  • Pipeline finished with Failed
    5 days 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
    4 days ago
    Total: 10572s
    #464396
  • Pipeline finished with Failed
    3 days ago
    Total: 8500s
    #465648
  • Pipeline finished with Failed
    about 15 hours ago
    #467401
Production build 0.71.5 2024