Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When a config entity that represents a bundle is cloned, the module also clones any fields and view/form displays.
For a large number of fields, this can lead to timeouts.
Proposed resolution
Use the batch API to create the fields.
Remaining tasks
Patch
Tests
Review
User interface changes
None
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#8 | 2845094-batch-clone-8.patch | 10.13 KB | larowlan |
| |||
#3 | entity-clone-batch-2845094.patch | 10.08 KB | larowlan |
Issue fork entity_clone-2845094
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
larowlangiddyup
Comment #3
larowlanThis works for me
Comment #5
jibranCode looks good.
We should add some tests.
Just a minor suggestion.
Do you think it is a good idea to move these to a new class with clone helpers?
Comment #6
mikejw CreditAttribution: mikejw at University of Adelaide commentedJust tried this out - works great! I had to add in eform_type to the list (will supply a patch soon) but all good after that.
Comment #7
colanI was going to rerun the tests now that the branch is passing, but this is NW based on the above comments so leaving as-is.
Comment #8
larowlanre-roll
Comment #10
dpiRe-rolled after conflicts from #3190160: Entity view displays with layouts are cloned incorrectly and pushed as MR.