Provide aliases to cloned content.

Created on 1 January 2020, almost 5 years ago
Updated 2 July 2024, 5 months ago

Problem/Motivation:

When users clone content using the Entity Clone module, the resulting cloned content does not retain the URL alias of the original item. Instead, the system-generated node path (e.g., node/123) is used when visiting the cloned content. This behavior diverges from what might be expected, where a user assumes that all properties, including the URL alias, would be duplicated.

Steps to Reproduce:

  • Install and set up a Drupal site.
  • Enable the Entity Clone module.
  • Create a new content type.
  • Add path alias for the content type.
  • Create content using the newly created content type and specify a URL alias for the content.
  • Visit the content and verify the URL alias is used in the page URL.
  • Use the Entity Clone module to clone the content.
  • Visit the cloned content and observe that the URL remains in the format of node/nid (e.g., node/xxx), despite the alias being visible upon re-editing the content.

Proposed Resolution:

Ideally, cloned content should preserve the URL alias from the source content. A modification is needed in the Entity Clone module to copy the URL alias when the cloning action is performed, while ensuring the uniqueness of the aliases. This implies that the cloned content may have a suffix or a differentiating factor added to the original alias to maintain a unique URL for each piece of content. The solution should make it possible to provide the URL alias for cloned content automatically during the cloning process.

Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom Syntapse

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024