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.
| Comment | File | Size | Author |
|---|---|---|---|
| ctools-invoke-all-modules-to-find-field-formatters.patch | 1.33 KB | das-peter |
Comments
Comment #1
das-peter commentedComment #2
neochief commentedI think $field_info requires sanity check before iterating through foreach. It may throw warnings on empty array.
Comment #3
das-peter commentedSince module_invoke_all returns in any case (except Exceptions) an array this shouldn't be a problem.
Comment #4
neochief commentedIt may return empty array. This will cause problem with foreach.
Comment #5
neochief commentedNevermind, everything should be okay.
Comment #6
eclipsegc commentedsub
Comment #7
merlinofchaos commentedCommitted and pushed.