Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'Entity Clone' or 'Replicate' to core #693

Open
willguv opened this issue Apr 2, 2024 · 17 comments
Open

Add 'Entity Clone' or 'Replicate' to core #693

willguv opened this issue Apr 2, 2024 · 17 comments
Assignees

Comments

@willguv
Copy link
Member

willguv commented Apr 2, 2024

We need to try installing https://www.drupal.org/project/replicate on LGD

(@markconroy has already got it working on Microsites in Essex and will push back to us)

@jenkinsp jenkinsp self-assigned this May 1, 2024
@willguv willguv self-assigned this Jun 6, 2024
@willguv
Copy link
Member Author

willguv commented Jun 6, 2024

I'll try doing this with my new gitpod set up

@markconroy
Copy link
Member

@willguv let's get a definition of what we want to do with replicate module. Installing it will do nothing, as it's just an API module. You need code then to use that API to achieve what we want.

I'm guessing we want to be able to clone all/some content types, and/or only certain users can use the clone functionality.

@willguv
Copy link
Member Author

willguv commented Jun 7, 2024

Aha! I installed it and there was no visible change - that explains it

@dedavidson has done Replicate work for Dumfries. What did you do there please Duncan?

@markconroy
Copy link
Member

If we get a list of what we want (or even some of what we want), I'll try spend time on this next week.

Maybe a generic approach with a settings form to say

  1. What content types should be replicatable?
  2. What user roles should be allowed to use replicate?

Then ... it would be up to each council to decide what way the want to use the module?

@markconroy
Copy link
Member

@willguv try installing the replicate_ui module and that should give you access to click some options for what you want.

https://www.drupal.org/project/replicate_ui

@dedavidson
Copy link

We used Entity Clone on D&G

@willguv
Copy link
Member Author

willguv commented Jun 11, 2024

Was there a reason you picked Entity Clone over Replicate @dedavidson? Thanks

@dedavidson
Copy link

@willguv nothing in particular except Replicate hasn't been updated in over a year and Entity Clone has more than double the sites using it.

@willguv
Copy link
Member Author

willguv commented Jun 11, 2024

@dedavidson @markconroy I've just installed Entity Clone and think it might be a better bet

  • it largely works out of the box (just needs permissions to be set)
  • for the reasons Duncan mentioned about usage and updates

What do you think please?

I'm not a fan of the word "Clone" if I'm honest. We can discuss changing it if we go this route

@markconroy
Copy link
Member

I've no problem with us using Entity Clone module.

@willguv willguv changed the title Install 'Replicate' Add 'Entity Clone' to core Jun 12, 2024
@willguv
Copy link
Member Author

willguv commented Jun 12, 2024

Thanks @markconroy let's go for it then!

Ideally Entity Clone should be added to core and enabled by default

Is there a way to change the word 'Clone' on the button to something else?

@ekes
Copy link
Member

ekes commented Jun 12, 2024

We use replicate in microsites. Is there really a reason to have two modules that do the same thing in LGD? We also have had this discussion on an issue somewhere else I think? Ah! Here localgovdrupal/localgov_events#96
The reason for replicate is that it can be controlled and configured by the developers to remove complexity, you can configure custom cloning (making sure the correct referenced entities are cloned etc.). Entity clone can't be used programatically. So one works both ways, the other not.

@willguv
Copy link
Member Author

willguv commented Jun 12, 2024

OK that's interesting, thanks @ekes. We shouldn't have two modules doing the same thing

What do we need to use Replicate - a list of entities we would like it to be able to clone?

@andybroomfield
Copy link
Contributor

I thought I posted on another issue, my question is what criteria would we prefer one over the other? Does paragraphs get cloned correctly with entity clone. Currently I'm building a replicate book feature for a BHCC section and possible expansion to publications with Replicate, is there an API to do that with entitiy clone as I wouldn't want to have duplicate modules.

@ekes
Copy link
Member

ekes commented Jun 17, 2024

is there an API to do that with entitiy clone

No. It's UI, or specifically, form driven. Which is why we used replicate in Microsites. Where as with replicate, it is API first, but you can install, or build, a UI for it.

What do we need to use Replicate - a list of entities we would like it to be able to clone?

Yes, assuming the replicate UI module isn't up to the job... it's not something I've used.

What seems best is: Make a list of entities you want a 'clone' (or whatever) tab on; and decide by default which entity reference fields you also want duplicated, and which want to reference the existing entity. Generally I think this will be most 'text' paragraphs want duplicating, but stuff like media or geo want to reference the same entity. There might be other things for specific fields that help usability, like do you want to replicate the event into a form with the date empty?

@willguv
Copy link
Member Author

willguv commented Jun 26, 2024

Andy: Issue with paragraphs and Entity Clone
Ryan: Have to republish paragraphs with Entity Clone
PaulB: Entity Clone issues with Subsites

@willguv willguv changed the title Add 'Entity Clone' to core Add 'Entity Clone' or 'Replicate' to core Jun 26, 2024
@willguv
Copy link
Member Author

willguv commented Jun 26, 2024

Finn: Write specific use cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

6 participants