0

When I try to export my content type using Features, it works. But when I import it on another Drupal installation, I've got an exception :

Exception : Invalid field name given: **my_field** is not a Field Collection field. in FieldCollectionItemEntity->__construct() (line 119 in **path_to_module**\field_collection\field_collection.module)

That's strange, because IT IS a Field Collection, and it worked fine on the first Drupal installation.

Any ideas ?

  • For clarity, you mean it exported fine from the first Drupal installation, and the problem is with importing into another Drupal installation? Or have you imported into another one without issue? – Johnathan Elmore Jan 7 '15 at 22:27
1

There are two solution to this problem, the first one is a bug in the module that can be fixed via this patch https://drupal.org/node/1084268

The second solution fixes a problem caused by orphan fields in field_collection_item table. First try removing my_field via drupal interface, if it didn't exists try searching your my_field in this table, if it existed , delete it

  • NOTE : the solution is dirty one, it worked for but it may have side effects, backup your database before trying it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.