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.
First, thanks for the module and taking the time to maintain :-)
If a field collection contains no data it still returns wrapper data, in my case to CCK blocks. This is problematic for themers, styling, etc..
I have fixed this by changing line 1258 to: -
return empty($element[0]) ? NULL : $element;
I'm not sure if this is the best way but it works for me.
Can this please be changed on the module. Apologies for not submitting a proper patch - I can't easily do this from here.
Comment | File | Size | Author |
---|---|---|---|
#3 | field_collection-empty-value-markup-2225697-3.patch | 355 bytes | sherakama |
Comments
Comment #1
jmuzz CreditAttribution: jmuzz commentedComment #2
elpino CreditAttribution: elpino commentedWorks for me too.
Allthough, probably because of the module version (in my case 7.x-1.0-beta7), I actually had to edit line 1275.
Comment #3
sherakama CreditAttribution: sherakama commentedSeems to work well enough for me. Patched attached based on initial report.
Comment #5
sherakama CreditAttribution: sherakama commented3: field_collection-empty-value-markup-2225697-3.patch queued for re-testing.