I added a 'vote up/down' field to one of my content types, and added the field to the node view panel (I'm using Panels to manage my node view pages). However, the 'vote up/down' field does not appear when I go to the node page. I made sure my user has permission to use the voting widget.

Anything obvious I'm missing?

Comments

marvil07’s picture

I've never really tried that, but maybe you can use some of the information on #476746: Expose widgets to panels.

brunodbo’s picture

I was trying to add the widget as a field in panels, like you can add the node title, body, ... rather than creating a separate content type for it (although that would indeed also be an option). I noticed Fivestar does this (ie. you can add a Fivestar widget as a content type without needing to create one yourself), and thought it would be neat if this module could also do that.

I did some digging today, and I think that the reason why the widget isn't being displayed in Panels is because CTools is missing formatter settings. If you look in ctools/plugins/content_types/entity_context/entity_field.inc (which turns an entity's fields into content types), line 118, there is:

$field_output = field_view_field($entity_type, $entity, $field_name, $field_settings, $language);

For the 'Vote Up/Down' widget I added, $field_settings doesn't contain a settings array, which (should?) come from ctools_fields_get_field_formatter_settings_form() on line 193 of entity_field.inc.

I'm not sure if CTools' entity_field.inc requires an implementation of hook_field_formatter_settings_form() (in vud_field.module) to be able to do this, but I'm guessing this may be the case.

brunodbo’s picture

Title: Adding node voting field to a panel » Adding 'Vote Up/Down' field to a panel

Changing title to avoid confusion with vud_node module.

marvil07’s picture

Category: support » feature

Patches welcome.

marvil07’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Issue summary: View changes