Skip to content

Commit d1724d1

Browse files
authored
Issue #200: Ensure Paragraph status is also cloned when using Node Clone with Paragraphs.
Fixes #200.
1 parent f3b2e18 commit d1724d1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

paragraphs.node_clone.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ function paragraphs_clone_items($entity_type, &$entity, $field_name, $langcode =
7474
/* @var $new_item ParagraphsItemEntity */
7575
$new_item = entity_create('paragraphs_item', array('bundle' => $bundle, 'field_name' => $field_name));
7676
$new_item->setHostEntity($entity_type, $entity, $langcode);
77+
$new_item->status = $old_item->status;
7778

7879
// Check if any of the fields in the newly cloned fc item is a paragraph.
7980
foreach (field_info_instances('paragraphs_item', $bundle) as $new_field_name => $new_field_instance) {

0 commit comments

Comments
 (0)