Needs work
Project:
Replicate UI
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Oct 2019 at 05:18 UTC
Updated:
18 Nov 2025 at 15:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mustafa_ab commenteda simple patch for the issue
Comment #3
benjifisher@mustafa_abdalle:
Thanks for opening this issue and supplying a patch.
When you provide a patch, remember to set the issue status to Needs Review (NR). That alerts the module's maintainers and other users (like me) that there is a patch available.
I reviewed and tested the patch. It works as expected, and in my opinion any project that wants to load the Edit form after replicating an entity can safely use this patch.
I am setting the status to Needs Work (NW) because I think that the redirect should be made an option instead of changing it unconditionally.
I also have one nit to pick: the code comment "return to Edit page" is inaccurate. The redirection goes to the Edit page of the newly created entity. We have never been there, so "return" is not right.
Work-around
Instead of applying this patch, you can get the same effect by adding something like this to a custom module:
Replace
TYPEwith the content type (or entity bundle) you are replicating.Comment #4
benjifisherOops, I did not actually test the patch in #2 when I wrote that comment. It needs an update since the code no longer contains
drupal_set_message().I am attaching an updated patch. I also changed the code comment.
The issue status is still NW because we should add a configuration option for this change.
Comment #5
chop commentedWould love to see this functionality brought into the Replicate UI module.
This redirect behaviour is something we've wanted for a long time. We used to be able to install the Replicate Bonus module, to provide a redirect back to the edit form.
https://www.drupal.org/project/replicate_bonus
Replicate Bonus is now unmaintained and has no Drupal 9 compatible release. There is a merge request to update it to Drupal 9 but nobody is able to merge it.
Comment #6
ruslan piskarovAlso, https://www.drupal.org/project/replicate_actions implements EventSubscriberInterface and makes redirects to node/edit page after replicating a node.
Comment #7
simohell commentedI did a survey on cloning content recently (you can find it from the DrupalCon Lille recordings soonish, or already now if you attended) and my question on redirect is: which language version? If this goes to module this is fairly important question for multilingual.
Also this goes hand-in-hand with alerting user if the entity (or with multilingual entities) was already published as the form view somewhat suggest that it is still in creation phase.
Comment #8
anybodyI'd very much vote to merge all the helpful base functionality into replicate_ui directly, for example as setting.
Until that, we should at least list the module on the module page: #3554704: List replicate_actions on the module page
Comment #9
anybodyComment #10
anybody