can't select my vote tags in views relationship
phoehne - July 3, 2009 - 15:33
| Project: | Fivestar |
| Version: | 6.x-1.17 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
Description
hi,
i have build a review content type with three cck voting fields.
it works very good.
now i want to create a view for the target content type.
to show the voting results, i have to set up a relationship 'vote results'.
in the settings of this relationship i cant select my 'vote tags', there are only options for 'no filtering', wich shows all three in an extra row and 'normal vote' wich shows an result with no votings because this tag isn't used
is this a bug or did i miss somthing
thanks peter

#1
I am having the exact same issue. I created a CCK fivestar voting field with a voting axis of 'point' and it does not show up as an option under voting tag in Views. I am not sure if it is a fivestar issue or a views issue.
#2
as far i can see:
to determine the aviable options for the views-relationship handler of fivestar, 'votingapi_metadata()' is called.
votingapi module set some defaults and offers via drupal_alter the possibility to alter this array.
but i didnt see a call to this hook in the implementation of the cck widget.
because i dont know anything about the cck api i am stuck at this point.
solve the problem:
a)sombody finds the right place to call this function and offer a patch
b)a bit dirty: make a little helper module and call hook_votingapi_metadata_alter and add the tags yourself
c)even more dirty: export the view- alter the tag to your needs - reimport and don't forget to never touch the settings again
hope i this helps
peter
#3
Will option 'c' work? It sounds so simple.
#4
i gave it a short try and it seems to work but test it yourself, as you said, its quick and simple
peter
#5
This appears to be a duplicate of #510268: Missing vote tag under Views relationships and should be fixed in the latest development version.