I don't know if the problem lies with bundle_copy or with paragraphs module.
Seems like bundle_copy tries to find a 'machine_name' property, but paragraphs entities have a 'bundle' property instead.
This results in:
The machine-readable name must contain only lowercase letters, numbers, and underscores.
Posting my quickfix in a patch here for anyone with the same problem
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | bundle_copy-machine_name_cloning_paragraphs-2593373-7.patch | 807 bytes | fizk |
| #6 | bundle_copy-machine_name_cloning_paragraphs-2593373-6.patch | 1.18 KB | interdruper |
| #3 | machine_name_problem-2593373-3.patch | 778 bytes | rv0 |
Comments
Comment #2
rv0 commentedComment #3
rv0 commentedComment #4
jeroen.b commentedI think it should use the "bundle" property from hook_entity_info.
Something like this:
Comment #5
vouza commentedI can confirm that since 7.x-2.x-dev I am not able any longer to import paragraph items. Was able to fix it like so:
Comment #6
interdruper commented#5 fixes the problem for me in 7.x-2.x. Patch for 7.x-2.x attached.
Comment #7
fizk commented@interdruper Does this work for you?
Comment #8
interdruper commented#6 and #7 seem equivalent to me and both work, because
$bundle->bc_entity_type === $entity_type === 'paragraphs_item'... unless some side-effect or error condition is escaping to my knowledge...