Closed (outdated)
Project:
Poll
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Mar 2008 at 16:55 UTC
Updated:
28 May 2016 at 13:31 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
FuN_ViT commentedsorry - a little bug in 216 line in poll.module
replace with what:
and update bug (serious)
line 661:
replace to
Comment #2
drummPlease attach a patch file, see http://drupal.org/patch/create
The brief description makes this look like a feature request, but I could be wrong since not much is explained. Either way, changes this big must happen in the development version first.
Comment #3
hillaryneaf commentedThe poll is not showing up for me for anonymous users... does anyone else have this problem.. or know what may be causing it?
Comment #4
Susurrus commented#14179: Optional cookie based voting authentication is related, though I'm not sure which should be labeled a duplicate of which...
Comment #5
pash7ka commentedI've patched poll.module from Drupal 6.12 to support cookies if they are enabled and revert to IP if they aren't.
Comment #6
greg.harveyThis will live in limbo forever if you don't set it to "needs review". =P
Ps - sorry, reading the note it's a D6 patch in a D7 issue, but it could still be reviewed and probably used.
Comment #8
greg.harveyAhh, Simple Test. I'll get this working for D6 next week and then do a D7 port of the patch for review/re-test. Promise. =)
Comment #9
greg.harveyOk, D7 patch attached. Aside from general tidy-up and doing things the D7 way, added a few lines to
poll_cancel()to get rid of the cookie if the user cancels their vote.Works for me! Other testers (+ bot) encouraged. =)
Comment #10
greg.harveyPs - anyone looking for the Drupal 6 patch, tidied version has been moved here: #14179: Optional cookie based voting authentication
Comment #12
greg.harveyHmm, I think the fail there is because of the way Subclipse produced the patch. Trying again.
Comment #13
moshe weitzman commentedExcellent. Code looks good. I'm pretty sure that our simpletest browser persist cookies so it would be great to write a test for this. Perhaps the test can wait come after slush deadline. Lets ask the committers via this RTBC. Feel free to work on the test today though.
In other news, perhaps someone here cares to fix a major poll bug - #39432: Disallow anonymous voting when page caching is turned on
Comment #14
dries commentedThis isn't quite ready yet, however, most of the things are minor.
Code style issue: (1) incorrect spacing and (2) wrong abbreviation of variable.
Please add some phpDoc.
Can't the insert code be simplified through db_merge()?
Misses trailing dot.
Incorrect spacing.
Comment #15
greg.harveyAttached patch is mostly done. I need to look in to
db_merge()- it's new and I'm not familiar.Comment #16
greg.harveyHmm, the inserts aren't inserts on different tables. They're different inserts on the same table, depending on the circumstances. I just read around db_merge() briefly and I don't think it's appropriate here, but I'm the first to admit I'm not familiar with this approach, so if someone who is says otherwise, please make it so.
Otherwise, I've cleaned up all the formatting stuff, hopefully to your satisfaction. =)
Comment #18
greg.harveyI'll try that again, without being so lazy! =P
On a side point, joachim pointed out in IRC that, when this patch is ready, Poll should use the fruits of this issue too: #440876: Reuse comment.module's anonymous cookie information
Comment #19
greg.harveySince this didn't make the cut this time, it needs re-rolling as a D8 patch. Updated as appropriate.
Comment #20
sowmithrii commented#12: 237213-poll_cookie-based_votes-D7.patch queued for re-testing.
Comment #21
greg.harveyWhy have you re-queued #12 when #18 is the latest patch? And anyway, this is a feature and features are frozen for D7, so even re-rolling it against dev is a waste of time, since it simply will not be committed. We need to sit tight until someone either says D7 is taking feature requests again (post-launch) or D8 development is properly under way.
Comment #22
greg.harveySetting to needs work - D7 patch will need porting for D8 (eventually).
Comment #23
mrkschan commentedHi there,
I'm uploading a .diff file that I modified the patch at comment #18. This .diff applies to Drupal 7.4 copy so that cookie based polling is enabled.
Comment #24
oscarino commentedHi Greg Harvey,
I tried to use your D7 patch but the codes are not the same anymore. I believe you did it for Drupal while it was still on Dev and now it's up to Drupal 7.15...
Is it possible if you update it to match the latest Drupal 7 version?
Thank you ahead of time ;)
Comment #25
oscarino commentedActually - mrkschan patch also works for Drupal 7.15 although the are many more extra lines of codes so you need to play a bit and understand where exactly his new lines of codes need to fall. The way I did it was to download drupal 7.4 and follow the patch using the lines provided in the patch
Comment #26
alexpottPoll has been removed from core
Comment #27
adammaloneThis will need a reroll to work with poll outside core and potentially to tie in nicely with Poll's session handling.
Comment #28
berdirThis hasn't been updated in 5 years. While there are possibly improvements, anonymous voting is working fairly well. Closing this.