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.
CommentFileSizeAuthor
#2 2716319-undefined-index-fid.patch544 bytesSocialNicheGuru
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SocialNicheGuru created an issue. See original summary.

SocialNicheGuru’s picture

Status: Active » Needs review
FileSize
544 bytes
Argus’s picture

Status: Needs review » Postponed (maintainer needs more info)

This issue needs a "steps to reproduce" so we can check it out.

SocialNicheGuru’s picture

Add an image field to a view
select media colorbox as the formatter
save the view
on the view page, the error will appear.

SocialNicheGuru’s picture

Here 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

SocialNicheGuru’s picture

Status: Postponed (maintainer needs more info) » Needs review
Argus’s picture

Issue summary: View changes
mpotter’s picture

I 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.

mpotter’s picture

Status: Needs review » Needs work