ctools_entity_field_extra_content_type_render() tries to get extra field content by using hooks (hook_entity_view and hook_ENTITYTYPE_view). This works great if extra fields are added by additional modules, but if the extra field is defined in the entity module itself and is rendered in entity module _view functon, this fails. The real example is taxonomy term description field. It can't be shown by current ctools. The provided patch tries to solve this problem, but more general solution is welcomed.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | extra_field_renderer-1947680-1.patch | 1.5 KB | maximpodorov |
| extra_field_renderer.patch | 1.52 KB | maximpodorov |
Comments
Comment #1
maximpodorov commentedUpdated patch. $langcode was in the wrong place.
Comment #2
andypostthis needs elsif for comment_view() which have different signature
Comment #3
maximpodorov commentedWhat extra fields defined in comment module are subjects of this issue?
Comment #4
andypostAuthor and subject @see comment_field_extra_fields()
Comment #5
maximpodorov commentedThey are form-level fields, and can't be shown in a simple way.
Comment #6
sk33lz commentedThis patch fixes an issue we had with a custom module implementation of hook_field_extra_fields.
Comment #7
sk33lz commentedReviewed and tested against 7.x-1.x-dev.
Comment #8
jody lynnDuplicate of #1907800: Extra fields need the fully built entity
Comment #9
andypostThe approach in #1907800: Extra fields need the fully built entity is different that does not care about specific implementations, so I'd like current issue way
Comment #10
andypost@Jody Lynn - see taxonomy_term_build_content() you can't see term description without that so patch here is right fix
Comment #11
damienmckennaThis could potentially save some headaches in Metatag getting Panels-driven entities to display correctly..
Comment #12
japerryFixed! Talking with some other devs, it looks like the comment issue shouldn't be a problem here.
http://drupalcode.org/project/ctools.git/commit/992d22a