x-posted from here: #1686370: translating a node with a collection in a collection causes database exception

i have a node type which has a collection field. in that collection is a field which is also a collection.

when i create an EN node and then try to translate; when i go to save the translated node i get:

DatabaseTransactionNoActiveException: in DatabaseConnection->rollback() (line 1021 of E:\wamp\www\boma\includes\database\database.inc).

not sure if this would be considered an i18n issue or field_collections issue; will x-post to that project as well.

Comments

liquidcms’s picture

Title: translating a node with a collection in a collection causes database exception » saving a collection in a collection causes database exception
Priority: Normal » Major

scary when i go looking for an issue completely unrelated (it would seem) and find that i already raised issue with same error msg.

on a completely different project with latest -dev of field collection - no translation going on.

i have a collection within a collection. the screenshot shows this: http://screencast.com/t/lMd7xe9QtA

i have removed the edit/delete links from the child collection and only left the ones for the parent (outer in my screen shot).

when i edit the parent collection directly and Save i get same error as reported above:
DatabaseTransactionNoActiveException: in DatabaseConnection->rollback() (line 1016 of E:\wamp\www\boma\includes\database\database.inc).

if i edit the complete node and save; everything works fine.

changing title to try to cover both issues.

liquidcms’s picture

Title: saving a collection in a collection causes database exception » EntityMalformedException: when editing a collection from node view when collection has nested collections
Version: 7.x-1.x-dev » 7.x-1.0-beta5

was about to raise issue on this and i found this one.. and go figure.. this one was mine.. lol

so report above was when i was using fc beta4. i have now upgraded to beta5 thinking it may have fixed this. it doesn't; but i now get a different error:

EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7633 of E:\wamp\www\boma\includes\common.inc).

i also tested on a fc which has no nested collections (in the same test node) and it works correctly; so seems to only fail with nested collections.

also, as before, editing the full node and saving works fine

-enzo-’s picture

I have the same issue with Drupal 7.19 and RC4.

-enzo-’s picture

Hello guys.

In my case the error was caused because the database structure was altered( column rename) and the SQL generated to store information fail when a field collection try to save.

Solution: delete all fields related with field collections and generate again: you need truncate field_collection_items and field_collection_items_revisions, becuase the interface don't delete the definition because the definition doesn't match with DB.

jmuzz’s picture

Issue summary: View changes
Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

Changing to normal as the module still works using the embedded forms.

I tried to duplicate this creating a nested field collection with a text field in the inner collection. I edited it using the inner collection's form and the parent collection's form and it saved successfully without errors both times.

Does anybody see this happening in the latest version? If so can steps be provided to reproduce?

jmuzz’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)