Closed (fixed)
Project:
File Entity (fieldable files)
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Aug 2011 at 06:30 UTC
Updated:
26 Aug 2013 at 03:11 UTC
I have use Colorbox File module, that format file entity via colorbox.
It hooks function hook_file_field_formatter_view().
And this formatter need to know current node nid and field name. But nothing about this are sent to it.
In other modules I see that node sends as $entity variable in hook_file_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display), but File Entity module sends current file entity instead of node.
In function file_entity_file_formatter_file_field_view() I have found the string:
$field = $instance = NULL;
Why they are null? How can I get current node and field info and send it to function hook_file_field_formatter_view()?
Comments
Comment #1
jwilson3For clarification, this issue was spurred by #1165198: Image field gallery, per page/post/field options.
Comment #2
dave reidComment #3
Cale Bierman commentedI tried replicating this issue using Media Colorbox. I can't see anything breaking when I create a view and use the Colorbox formatter, all the images work and load as they should.
Do you have any steps to help re-create the issue?
Comment #4
devin carlson commentedWith #2061531: Double 'Image' file formatter in the 'Manage file display' tab the Media Colorbox module should not longer be necessary as the regular field formatter provided by the Colorbox module should work just fine.