Since hook_field_formatter_info allows to define "field types" it's possible that a module defines formatters for fields introduced by another module. Thus ctools_fields_get_field_formatter_info should search in all modules for appropriate formatters - and not only via hook_field_formatter_info_alter.
Attached patch should make this happen.

Comments

das-peter’s picture

Status: Active » Needs review
neochief’s picture

Status: Needs review » Needs work

I think $field_info requires sanity check before iterating through foreach. It may throw warnings on empty array.

das-peter’s picture

Status: Needs work » Needs review

Since module_invoke_all returns in any case (except Exceptions) an array this shouldn't be a problem.

neochief’s picture

Status: Needs review » Needs work

It may return empty array. This will cause problem with foreach.

neochief’s picture

Status: Needs work » Reviewed & tested by the community

Nevermind, everything should be okay.

eclipsegc’s picture

sub

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.