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.
I use galleryformatter often enough, but for the first time inside Views.
I've selected galleryformatted as formatter for image field and it returned nothing.
Fix:
renderable array generated properly, problem with returning value
galleryformatter.module
line: 375
/**
* Implements hook_field_formatter_view().
*/
function galleryformatter_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
...
//return $element;
return array($element); // Return array with $element instead
}
Comment | File | Size | Author |
---|---|---|---|
#1 | 2087213-1-return-array.patch | 451 bytes | kscheirer |
Comments
Comment #1
kscheirerConverted the above into a patch. Can you test that with this change the regular usage (as a field formatter) still works properly?
Comment #2
mpa3b CreditAttribution: mpa3b commenteddoesn't work, shows only the first image
Comment #3
ytsejam CreditAttribution: ytsejam commentedPatch works for me, million thanks! Hope this gets committed.
Comment #4
devvmh CreditAttribution: devvmh as a volunteer commented+1 the patch in #1 works for me. I'd love to see this included in the next update to this module
Comment #5
Chetna_Negi CreditAttribution: Chetna_Negi as a volunteer commented#1 working. Thanks player259 and kscheirer.
Comment #6
kscheirerBased on 3,4,5
Comment #8
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer commentedThanks!