Hi,
I'm not sure if this is a fivestar issue, a views issue or maybe it's something that can be fixed by doing this another way...
I'm generating a view that contains the rating for the nodes in question. The View basic settings that I guess could be affecting the output are;
Style: Unformatted
Row style: Fields
My problem is that the widget is being generated within a span;
<div class="views-field-value"><span class="field-content"><div>fivestar content</div></span></div>
After taking a look at views-view-fields.tpl.php I noticed there's a comment that says
// $field->element_type is either SPAN or DIV depending upon whether or not
// the field is a 'block' element type or 'inline' element type.
The code that follows that (difficult to paste into here without breaking things) then goes on to insert either
<span class="field-content">
or
<div class="field-content">
depending on the value of $field->element_type
Has anyone come across this before or have a possible solution that doesn't involve changing the View style to Table etc.
Many thanks :)
Comments
Comment #1
deviantintegral commentedActually, I think this is a problem with the static widget. It's assuming that it's being placed within a block-level element, which is rarely the case with views. There's no reason why it can't be a span instead. Here's a pair of patches that changes all of the divs in them_fivestar_static to spans, which fixes the validation issues. Note that this would affect any sites that are theming the div specifically, so we should probably call it out in the next set of release notes.
Comment #3
deviantintegral commentedHere's a patch that removes the divs from all widgets, passes tests, and fixes a few typos. Individual commits at the moment so the changes are easy to see, but feel free to squish this down.
Comment #4
deviantintegral commentedComment #5
dbt102 commented+1 bumb
Comment #6
joelpittetThis looks good but needs to be re-rolled as upstream changes have made the patch unable to apply:
Comment #7
dbt102 commentedComment #9
dbt102 commentedadding codesniffer fix to patch and rm test changes to see if the patch will pass
Comment #10
dbt102 commented