OK, I added vud_field to one node type, configured it properly, but it doesn't show anywhere (not on the node edit for, or the node view).

Using devel and dpm(get_defined_vars()); shows that the field is completely empty, although the variable is set.

Am I doing something wrong?

PS. I tested this with the 7.x-1.x-dev that drush downloads, and the one from git.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JeremyFrench’s picture

I have found that you need to save the node before the widget will appear.

vlkff’s picture

Status: Active » Needs review
FileSize
961 bytes

The problem is that the field items is empty before node object is saved (or resaved how it is described in note#4) with values for items provided by
I solved the problem with hook_field_prepare_view() , in the same way as default image implemented in image.module, and as for me it is a good solution.

But while a patching I noticed that you can't change voting settings for specific entity and in terms of that, storing 'vud_widget' and 'votingapi_tag' for each entity is useless.
So I think that we have to make voting settings configurable for a particular entity too or rework the data storing. Making voting settings configurable for a particular entity looks more attractive for me , because that feature will be required by users, but probably it is an object of discussion.

Status: Needs review » Needs work

The last submitted patch, 1295574-vote-up-down-set-default-value-for-empty-items-4.patch, failed testing.

marvil07’s picture

Title: vud_field does not appear on node » Preload vud_field based on field settings
Category: support » bug
Status: Needs work » Fixed

@vlkff: Thanks for the patch!

I have just commushed it to 7.x-1.x

About:

But while a patching I noticed that you can't change voting settings for specific entity and in terms of that, storing 'vud_widget' and 'votingapi_tag' for each entity is useless.

I guess it was a bug before some commits. If you are able to reproduce it in current 7.x-1.x please open a new issue about it.

Status: Fixed » Closed (fixed)

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