I am working on a Drupal website. I created a content type with field collection. Field collection contaning 3 fields and is multiple. I have created lots of node of this content type successfully. But now when edit node and save them it gives me error: The host entity cannot be changed. in FieldCollectionItemEntity->updateHostEntity() (line 239 of /home/user/public_html/xyz/sites/all/modules/field_collection/field_collection.entity.inc).
Only some nodes are giving above error. Please help me to resolved this issue?
Let me know if you need further information about the issue.
Thanks!
I resolved the issue myself. The issue was in database. I am not sure how but the nodes on which I was getting error contains the multiple entry for a field collection item id in multiple nodes. I delete the nodes and re-create with same data. Its working now. Hope it helps someone.