Active
Project:
File Entity (fieldable files)
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Jun 2011 at 15:25 UTC
Updated:
9 Jan 2012 at 21:45 UTC
In file_entity_file_formatter_file_field_view(), you declare a NULL $field variable (line 272 of file_entity.module), and proceed to invoke hook_field_formatter_prepare_view() and hook_field_formatter_view() implementations passing this NULL variable in place of a $field variable containing the field structure.
Passing $field as NULL breaks field formatters like MediaElement which require some information normally contained in the $field variable for proper operation.
Invoking hooks with parameters other than what is specified in the API does not follow best practices, and breaks compatibility.
Comments
Comment #1
dave reidSeems to still be active. Transferring to file_entity which will need to be backported to Media 1.x.