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 importing a node the sections are not imported.
The error is:
Type php
Location /node/add/task/import
Referrer /node/add/task/import
Message Error: Call to undefined method FieldCollectionItemEntity::__set_state() in eval() (line 225 of /modules/contrib/node_export/formats/drupal.inc(23) : eval()'d code).
Severity error
Operations
Steps to reproduce
Export a task-node with sections filled and import it again.
Proposed resolution
Apply patch in #1924906: FieldCollectionItemEntity::__set_state() seems to fix the problem
This is not the real problem. The real problem at importing nodes with sections is EntityMalformedException: Missing bundle property on entity of type field_collection_item. in entity_extract_ids()
.
After further testing the patch in #3230583: EntityMalformedException on import since Drupal 7.79 fixes this problem really, not this patch.
Comment | File | Size | Author |
---|---|---|---|
#2 | dvg-export_sections_error-3231931-2.patch | 566 bytes | JoshaHubbers |
Comments
Comment #2
JoshaHubbers CreditAttribution: JoshaHubbers at iO commentedThis adds the patch to field_collections.
Comment #4
JoshaHubbers CreditAttribution: JoshaHubbers at iO commentedTested on several sites. The patch works as expected.
Comment #5
JoshaHubbers CreditAttribution: JoshaHubbers at iO commentedComment #6
JoshaHubbers CreditAttribution: JoshaHubbers at iO commentedThis patch is not the solution. After further investigation the patch in #3230583: EntityMalformedException on import since Drupal 7.79 fixes this problem really. But that's for the field_collection_deploy module, which is not in the DVG-release. But I mention this here so if you run into this problem, you find how to fix it.
Comment #7
JoshaHubbers CreditAttribution: JoshaHubbers at iO commented