Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
This seems to be a regression bug of #1107264: FieldsRSIPreventor class handles node languages incorrectly and duplicates core functionality.
The problem is, that we call field_get_items on the media_gallery node and ask for media_gallery_media_original. This is just a temporary property, we add on node-load. Therefore field_get_items returns no items.
Problem file: media_gallery.theme.inc
Problem line:
79 $type_count = media_gallery_get_media_type_count($node, 'media_gallery_media_original');
Comment | File | Size | Author |
---|---|---|---|
#1 | media_gallery-fix-field_get_items-1671268-1.patch | 1.46 KB | Moloc |
Comments
Comment #1
Moloc CreditAttribution: Moloc commentedHere is a workaround / patch.
Comment #2
lsolesen CreditAttribution: lsolesen commentedWhere can I see the problem in the UI? I cannot find anywhere with a count?
Comment #3
Moloc CreditAttribution: Moloc commentedIn the all galleries page.
When you hover a gallery(node), then the title is displayed. In beta7 and with this patch, there is also the amount of items displayed in the hover message.
Comment #4
lsolesen CreditAttribution: lsolesen commentedConfirmed that the patch works.
Comment #5
Moloc CreditAttribution: Moloc commentedCommitted: http://drupalcode.org/project/media_gallery.git/commit/b51e1a66d96765b9f...