Make it possible to configure the published state of cloned entities.

Created on 27 February 2019, over 5 years ago
Updated 1 June 2023, over 1 year ago

Problem/Motivation

Currently when cloning an entity, lets say a node, the published state of the original entity is also cloned. When cloning nodes there is really not a reason for the cloned node to be published directly, because:

  • This creates duplicate content.
  • The node will for sure have to be edited in the first place. (If not for the "ugly" title only)
  • Publishing could also trigger other unwanted actions, a couple of examples could be: Feeds contain the cloned nodes, nodes could be published to social media, etc.

Proposed resolution

Provide the ability to determine the published state of the cloned entity.

It should be configurable what the default value would be, per entity, and possibility even per bundle. In my option it would be logical to have these settings available on the entity type configuration page (f.e. a node type). On the clone form of the entity this option is available, with the default used, but possible to override.

Remaining tasks

  • Determine where to configure clone settings for publishing
  • Implement solution to allow cloned entities to be unpublished if indicated
  • Write a test that proves this works

User interface changes

TBD.

API changes

TBD.

Data model changes

TBD.

Release notes snippet

TBD.

Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

🇳🇱Netherlands steven buteneers

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • @rajeshreeputra opened merge request.
  • 🇮🇳India rajeshreeputra Pune

    @interactivex for creating another form field where you can chose the content moderation state you want it to set, can we file separate issue and work in that?

  • Status changed to Fixed over 1 year ago
  • 🇮🇳India rajeshreeputra Pune

    Thank you for working on this, merged, release will follow shortly.

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Status changed to Fixed over 1 year ago
  • I believe that this feature introduced a bug when cloning custom blocks.

    I've updated to 2.0.0-beta3 and when we try to clone a block, the option for "Save cloned Custom block as published" appears.

    If left unchecked, the block clones, and seems to work as intended, however, it is not visible to anonymous users. If checked, I receive a server error.

    As far as I am aware, there is no "publish" state for custom blocks, so should the option even be available for that entity type? The feature is great for nodes though.

  • 🇮🇳India Logeshvaran

    I too face the same issue as the previous comment.

    I am using Entity Clone Version (2.0.0-beta2 ) and also the content moderation module. When cloning the existing published content, new cloned content has been created.

    But when viewing the original content. It shows "Website Encounter Error". I deleted the newly cloned content and then able to view the original content.

    Also, I noticed that If the cloned content is in a draft version, Unable the view the original content. If the cloned content is published then able to view the original Content.

Production build 0.71.5 2024