Hello!
Looks like incompatibility with Field collection module appeared at some point in temps of re-writing Entity Translation.
Let's install Drupal 7.16, Entity Translation 7.x-1.x-dev (2012-Oct-15), Entity API 7.x-1.0-rc3 (or latest -dev, doesn't matter) and Field Collection 7.x-1.0-beta4 (or latest -dev). Now we'll create "Test" node type, with multilingual support set to "Enabled, with field translation", and with one additional field "field_testcoll", of type "Field collection". Now we have to add one field to "field_testcoll" field collection, let's say it'll be "field_intgr" of type "Integer".

Now we'll try to add new node of type "Test". When we're trying to submit it, we'll see this error:
EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7562 of /var/www/sky2.me/public_html/includes/common.inc).

It should be noted, that if we'll install Entity Translation 7.x-1.0-alpha2, there will be no problems.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bforchhammer’s picture

Status: Active » Closed (duplicate)

Yes, field collection entities are not yet supported with the dev version of ET, see #1568618: Field Collection integration.

renat’s picture

Status: Closed (duplicate) » Active

Actually, #1568618 is another issue - about Field collections translatability. In my case both node "field collection" field, and that collection's fields have default values, i.e. they are untranslatable.
Moreover, that combination worked perfectly well with ET-alpha2, so, in case there will be no fixes in a next few days, ET users will face serious regression after updating to upcoming ET-beta1. We are not talking about not-so-important notifications - you'll not be able to add any new nodes, in case particular node type is ET-enabled and has "field collection" field attached.

In case you are 100% sure, that it is OK to ship ET-beta1 with such a regression, and sometimes it is going to be fixed at #1568618, feel free to close it again, but from my point of view we should rather consider setting a higher priority to this issue.

bforchhammer’s picture

Status: Active » Needs review
FileSize
1.6 KB

I'm able to reproduce your problem.

It looks like we accidentally use the NodeTranslationHandler for field collection items; from what I can see this happens because entity translation currently assumes that a form corresponds to a single entity (and single entity type) in entity_translation_entity_form_get_handler().

Attached is a very simple patch which at least restores access to the edit form, but doesn't solve the whole field collection integration issue...

The @todo in the patch would need to be resolved before commit, i.e. we need to check that this change doesn't have negative effects on something else.

renat’s picture

Thank you for that patch!
For me it works just fine, issue is eliminated, though a bit later I'm going to check more edge cases. Don't mark as RTBC because of TODO.

plach’s picture

I wasn't able to repreduce the error with the latest dev versions of Drupal core, ET, Entity and Field Collection. Please confirm that you still see the fatal.

However we want to take care of people not being on dev, hence I'm going to commit this anyway. We don't want to handle forms where the #entity_type key is not defined, since it would become horribly complex to instantiate the translation handler.

The attached patch removes the todo and slightly adjusts the code. Please confirm the fix is still good.

renat’s picture

The bug is still there with latest dev versions of all involved modules (But core is 7.16. Can check -dev version as well, if need be - but as far as I understood @bforchhammer, looks like it has nothing to do with core). Patch from #5 fixes it fine.

plach’s picture

Status: Needs review » Reviewed & tested by the community

Well, if the fix works let's go on with it.

bforchhammer’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed, thanks!

plach’s picture

renat’s picture

In my case this issue is definitely fixed with latest -dev. Would be nice if @liquidcms will provide additional data about reproducing his issue at clean install.

plach’s picture

After reading again his comments it seems he didn't try the latest dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit a19a52a on 7.x-1.x, et-permissions-1829630, factory, et-fc, revisions by bforchhammer:
    Issue #1818620 by bforchhammer, plach | renat: Fixed fatal error when...

  • Commit a19a52a on 7.x-1.x, et-permissions-1829630, factory, et-fc, revisions, workbench by bforchhammer:
    Issue #1818620 by bforchhammer, plach | renat: Fixed fatal error when...