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.
Notice: Undefined index: file_id in oa_media_media_colorbox() (line 99 of oa-2.60/profiles/openatrium/modules/apps/oa_media/oa_media.module).
I get the above error on the view page when I select media_colorbox as the formatter for an image in my view.
Steps to reproduce
- Add an image field to a view
- select media colorbox as the formatter
- save the view
- on the view page, the error will appear.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2716319-undefined-index-fid.patch | 544 bytes | SocialNicheGuru |
Comments
Comment #2
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedComment #3
Argus CreditAttribution: Argus as a volunteer commentedThis issue needs a "steps to reproduce" so we can check it out.
Comment #4
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedAdd an image field to a view
select media colorbox as the formatter
save the view
on the view page, the error will appear.
Comment #5
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedHere is the debug backtrace using devel.
file is returned as an object. There is no file_id returned.
×WARNING MESSAGENotice: Undefined index: file_id in oa_media_media_colorbox() (line 99 of oa-2.63/profiles/openatrium/modules/apps/oa_media/oa_media.module). =>
... (Array, 66 elements)
65: oa_media_media_colorbox() (Array, 2 elements)
file (String, 60 characters ) profiles/openatrium/modules/apps/oa_media/oa_me...
profiles/openatrium/modules/apps/oa_media/oa_media.module:99
args (Array, 1 element)
0 (Array, 12 elements)
entity_id (String, 2 characters ) 20
file (Object) stdClass
fid (String, 2 characters ) 74
uid (String, 1 characters ) 1
filename (String, 22 characters ) sfsu-doublevictory.jpg
uri (String, 32 characters ) private://sfsu-doublevictory.jpg
filemime (String, 10 characters ) image/jpeg
filesize (String, 5 characters ) 83738
status (String, 1 characters ) 1
timestamp (String, 10 characters ) 1464085147
origname (String, 22 characters ) sfsu-doublevictory.jpg
type (String, 5 characters ) image
uuid (String, 36 characters ) 475d7ea7-5131-4a0a-9d85-b9ec01179b9e
field_file_image_alt_text (Array, 0 elements)
field_file_image_title_text (Array, 0 elements)
rdf_mapping (Array, 0 elements)
metadata (Array, 2 elements)
alt (String, 0 characters )
title (String, 0 characters )
height (Integer) 518
width (Integer) 800
field (Array, 16 elements)
display_settings (Array, 8 elements)
langcode (String, 3 characters ) und
path (String, 45 characters ) media_colorbox/74/media_gallery_thumbnail/und
title (String, 5 characters ) Image
item (Array, 0 elements)
item_style (NULL)
item_class (NULL)
media_colorbox_caption (NULL)
theme_hook_original (String, 14 characters ) media_colorbox
Comment #6
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedComment #7
Argus CreditAttribution: Argus as a volunteer commentedComment #8
mpotter CreditAttribution: mpotter at Phase2 commentedI wonder if this is a bug in the media_colorbox module itself. Looking for "file_id" I also see in media_colorbox.theme.inc that the theme_media_colorbox() function also references 'file_id'.
So this needs more investigation before I can commit the patch.
Comment #9
mpotter CreditAttribution: mpotter at Phase2 commented