Polls are rendering (before the user votes) with the hyperlinked title just above a duplicate label. Both the title and the label use the same text so it looks pretty goofy in many themes (see attached).
After the user votes, the label text disappears and the poll results page looks like it should.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 86130_poll.module_r1.195.2.1_patch_2 | 937 bytes | AjK |
| #4 | 86130_poll.module_r1.195.2.1_patch_1 | 962 bytes | AjK |
| poll_issue.gif | 10.87 KB | kmillecam |
Comments
Comment #1
AjK commentedThis is because in page/teaser view the question is also used for the node title (you don't get this when the poll is in a block).
This is probably easily fixed but I'm not sure in what way to fix. If the title isn't the question then the node has no title, thus no link to the node. So I guess surpressing the question in the content area is the way to "fix" this? If so let me know and I'll roll a patch.
regards,
--AjK
Comment #2
kmillecam commentedAjK, I believe you're on the right track.
The poll renders correctly as:
1) a block that displays the poll
2) a block that displays the results (bar graph)
3) a node that displays the poll
4) a node that displays the results
5) a node (teaser) that displays the results
but incorrectly as
4) a node (teaser) that displays the poll.
I'm not sure why teasers are treated differently. Maybe you could look at the code that displays the block and mimic that behavior in the node (teaser) code.
Thanks for your help!
Kevin
Comment #3
edmund.kwok commentedAjK, try looking at poll_view_voting() function, where $form['choice'] is set. That should be the place to fix then ;-)
Comment #4
AjK commentedDoes this do what you require? Please test and report back.
regards,
--AjK
Comment #5
AjK commentedActually, this patch is a literal "backport" from HEAD that seems to be a simpler solution and does the same thing.
Comment #6
kmillecam commentedWorks beautifully AjK!
Thanks for the great work.
Kevin
Comment #7
killes@www.drop.org commentedapplied to 4.7
Comment #8
(not verified) commented