Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | field_collection-2113993-restore_entity_type_bundle.patch | 897 bytes | jonhattan |
Comments
Comment #1
jonhattanAs 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.
Comment #2
Tobias Xy CreditAttribution: Tobias Xy commentedWorks for me!
Comment #3
asif_khan CreditAttribution: asif_khan commentedworks for me to integrate with Conditional Fields Support for multiple "Field Collection" fields.
Comment #4
drupalove CreditAttribution: drupalove commentedThis patch makes it possible to use Field Conditional States and Conditional Fields with Profile2. Can we change the issue status and commit it, please.
Comment #5
stefan.r CreditAttribution: stefan.r commentedCould 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.
Comment #6
stefan.r CreditAttribution: stefan.r commentedMaybe something like #2396251: Visibility settings not working for text field target in field collection is a way to do without this patch?