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.
Comment | File | Size | Author |
---|---|---|---|
#5 | et-field_collection_fatal-1818620-5.patch | 1.92 KB | plach |
#3 | et-field-collection-fatal-error-quick-fix-1818620-3.patch | 1.6 KB | bforchhammer |
Comments
Comment #1
bforchhammer CreditAttribution: bforchhammer commentedYes, field collection entities are not yet supported with the dev version of ET, see #1568618: Field Collection integration.
Comment #2
renat CreditAttribution: renat commentedActually, #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.
Comment #3
bforchhammer CreditAttribution: bforchhammer commentedI'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.
Comment #4
renat CreditAttribution: renat commentedThank 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.
Comment #5
plachI 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.
Comment #6
renat CreditAttribution: renat commentedThe 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.
Comment #7
plachWell, if the fix works let's go on with it.
Comment #8
bforchhammer CreditAttribution: bforchhammer commentedCommitted and pushed, thanks!
Comment #9
plachHere's the related FC issue #1281974: Missing bundle property on entity - related to translations.
Comment #10
renat CreditAttribution: renat commentedIn 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.
Comment #11
plachAfter reading again his comments it seems he didn't try the latest dev.