Not a bug as such...As pollfield works with views, it may arise that more than one poll is visible at any given time (eg within a node and within a block). With this in mind, I would suggest replacing

$poll_result="";

with

$poll_result="";

Just to stop validator grumbling. I also noticed that views is wrapping a element_type;

WITH

// Set the fields in this view to be treated as blocks
$my_element_type = 'div';

print $my_element_type;

Cheers :)

Comments

Oops, the comment block doesn't like me writing code. Basically, replace the id definition for pollfield with a class definition.

As for the other error. Views is wrapping a span around the pollfield causeing validator to gripe. field->element_type needs to be set to DIV; as I don't know how to go about this myself, I just stuck a temporary fix together myself by copying views-view-fields.tpl.php from modules/views/theme to my site theme, and renamed it views-view-fields--poll*.tpl.php *whatever your view is called, and replaced

print $field->element_type;

WITH

$my_element_type = 'div';

print $my_element_type;

Version:6.x-1.8-beta1» 6.x-1.x-dev

subscribe

Assigned:Unassigned» bryan kennedy
Priority:Minor» Normal

Ahh yes, good find. This is still an active bug.

There are many situations where a pollfield can appear more than once on a page. I want to make this change for the next release, but need to document the upgrade path. Should be simple for users to fix, but with this change to the module css, people's css is likely to change. I'll work on the changes this weekend. Elevating status since breaking HTML validation is double plus bad.