I'm the maintainer of the Getlocations module. I am having problems getting it to work with Field Collection.
This is what I did:
I installed Field Collection, created a new content type, added a Field Collection instance to it (as embedded). I then went to the field collections page and added a textfield and Getlocations Fields to the collection. So far so good.
I then attempted to create the new content type, the form came up, the map and address fields were there and working so I filled it all in, hit Save and got the error

DatabaseTransactionNoActiveException: in DatabaseConnection->rollback() (line 1021 of /opt/www/drupal-common-7.12/includes/database/database.inc).

I then added dd() in various places in the Getlocations code to see what was (or was not) happening.

It got as far as the code that normally is run after the node has been created ( hook_field_insert() ) but before the location information has been saved. However the node had not yet been created and the $entity object was entirely different from what it normally is, so nothing was done.

I am at a loss as to why this is happening, any ideas would be welcome.

Comments

phenaproxima’s picture

This happens for me too, although it only started occurring after I changed a field's type at the database level from varchar to mediumtext. The weird part is that I did this same thing to another field (which is used only on a specific node type) and it works without a hitch. Only Field Collection has this problem.

smallpotatoe’s picture

I also get this error on an Integer field in a field collection whenever the number entered is approximately anything beyond 2,150,000,000.

smallpotatoe’s picture

Nevermind this for me, figured it is the php int max on 32 bit system, 2,147,483,647.

aendra’s picture

I'm getting this error whenever I use the Manual Crop module. See related issue: http://drupal.org/node/1679390

aendra’s picture

Odd. Seems to have worked itself out — other field collections I've cropped haven't displayed that error. Not sure why...

Anonymous’s picture

I have same issue here.

I set a content type like the following:
Label:xxxx
Machine name:field_ xxxx
Field type:Field collection
Widget:Table

Than I set a Field collections like the following:
Label:yyyy
Machine name:field_ yyyy
Field type:Text
Widget:Text filed

When I submit a new entry into the node I got following error:
DatabaseTransactionNoActiveException: in DatabaseConnection->rollback() (line 1019 of /includes/database/database.inc).

Any help is appreciated

iaminawe’s picture

I am also getting this exact error when I submit a new node with field collections

rizedr’s picture

Getting the same issue when trying to programmatically create a content type with fields.

Here is my .install file: http://paste2.org/p/2473141
Here is my .inc file which containts the field creation funtions: http://paste2.org/p/2473150

kiwad’s picture

I was having this issue

Was creating programmatically field collection items

My custom module was in ansi instead of UTF-8.

So if I was doing
$field_collection_item->field_somefield['und']['0']['value']='e'; //it was OK

$field_collection_item->field_somefield['und']['0']['value']='é'; //triggered the error

Changing the encoding of my file from ANSI to UTF-8 corrected my issue

timaepi’s picture

I know I'm a bit late to the party, but is there any solution to this?