Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
poll.module
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2007 at 00:05 UTC
Updated:
23 Aug 2007 at 14:59 UTC
Jump to comment: Most recent file
Comments
Comment #1
merlinofchaos commentedCrap, wrong version of the patch. This one didn't complete the process of renaming a theme function.
(I renamed theme_poll_view_voting to theme_poll_vote which is slightly more sensible.)
Comment #2
merlinofchaos commentedWhoops. Last patch had broken the cancel vote button.
Comment #3
pwolanin commentednew node - previewing gives this error:
Comment #4
pwolanin commentedupon saving, a couple notices from node module plus:
Also, I'm seeing some weird behavior when viewing the same poll when logged out or logged in on the same computer. If I voted while logged in and then I'm logged out (and the anonymous user can 'cancel own' vote) the cancel button appears for the anonymous user even though the vote was made by an authenticated user.
Comment #5
pwolanin commentedodder still - though the cancel button appears for the anonymous user, it has no effect in the case outlined above- wher an authenticated user has voted already.
Once the anonymous user has voted the cancel button works as expected.
Comment #6
pwolanin commentedalso, after voting if I go to the URL like node/6/results I get 'Access denied', rather than being shown the same results as at node/6
Comment #7
pwolanin commentedOn the bright side - overall the module with this patch works far better than the crappy broken module in 5.x.
another problem (also present in 5.x) if I edit the node, it allows me to vote again, even though my vote has already been recorded.
Comment #8
merlinofchaos commentedOk, new patch fixes the notice errors pwolanin identified.
Also, I'm seeing some weird behavior when viewing the same poll when logged out or logged in on the same computer. If I voted while logged in and then I'm logged out (and the anonymous user can 'cancel own' vote) the cancel button appears for the anonymous user even though the vote was made by an authenticated user.
I can't duplicate this behavior on my setup. I suspect this means there's something subtly wrong in the piece of code that checks to see if the current user has voted, but I don't see how it can work this way. It's very confusing.
also, after voting if I go to the URL like node/6/results I get 'Access denied', rather than being shown the same results as at node/6
This is controlled by the 'inspect all votes' permission, which lets you see results even if you haven't voted. Otherwise the way to see results after voting is to visit the node itself. I think this is pretty much the intended behavior;
Comment #9
merlinofchaos commentedEditing a poll clears the history of who voted for what. This is an annoying side effect of the fact that choices have no IDs, so when you save the node, it can't tell if the choices you put in (even if unchanged) are the same or not. So it just wipes the whole thing.
That's kind of dorky. I'm not sure if I have the energy to fix it with the current poll UI.
Comment #10
dries commentedI haven't tested this patch yet, but I did had a first look at the code:
Looks good so far, but I'll review it some more/better later on.
Comment #11
merlinofchaos commentedNew patch addresses Dries' PHP Doc comments, plus it moves the : into the theming layer.
To explain, a common complaint about poll module is that in the block, it puts a : after the question. This happens because the title of the poll is put into the #title field of the radios form widget. This patch moves that title to poll-vote.tpl.php -- though it retains the :. (I'm not actually sure it should, that : is kind of annoying there.)
Comment #12
moshe weitzman commentedjust want to point out the pending AHAH patch for poll.module at http://drupal.org/node/155870 and and its later cousin (AHA fapi 2) - http://drupal.org/node/157752. not sure if this patch should merge with the first one above.
Comment #13
merlinofchaos commentedSince I completely left out my UI enhancements, the ahah patch can follow this (or vice versa) if we really want. Alternatively, I can probably restore my UI enhancements and provide it as a better patch than the ahah patch.
I just realized I'd never set this back to review after my last version of the patch. No wonder no one has been reviewing it.
Comment #14
dries commentedI committed this patch. Thanks Earl. I'll update the AHAH patches to mention that this patch went in first.
Comment #15
(not verified) commentedComment #16
yngens commentedwill this patch work if i apply it against 5.x?
Comment #17
merlinofchaos commentedNo, this patch relied on new features in 6.x. It won't work in 5.x