On widget build, a call to field_attach_form() is done to incorporate the fc entity fields in the fc element. The element itself is passed as the $form parameter and #entity_type and #bundle are set on it, overwritting the already set values of the fc element.

I think this is a not desired behaviour and correct values may be restored.

#1 field_collection-2113993-restore_entity_type_bundle.patch897 bytesjonhattan
PASSED: [[SimpleTest]]: [MySQL] 132 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


jonhattan’s picture

Status: Active » Needs review
897 bytes
PASSED: [[SimpleTest]]: [MySQL] 132 pass(es). View

As far as I've tested, restoring the values back doesn't break anything.

This helps fixing #1799522: Does not play nice with field collections, and I guess it also helps integration with other modules.

Tobias Xy’s picture

Issue summary: View changes

Works for me!

asif_khan’s picture

drupalove’s picture

This patch makes it possible to use Field Conditional States and Conditional Fields with Profile2. Can we change the issue status and commit it, please.

stefan.r’s picture

Could the maintainer of Field collection have a look at this? Not sure this is actually safe to change anymore as other modules may depend on the (possibly faulty) behavior of #entity_type / #bundle already.

I'll have a look in the FCS issue to see if it can be fixed without this patch.

stefan.r’s picture

Maybe something like #2396251: Visibility settings not working for text field target in field collection is a way to do without this patch?