Hi,
Thanks for a great module - finding it really handy.
Had a look through the code of the 7.x branch, and I've noticed a few things I've corrected and patched:
*Code inconsistencies - where possible I've updated the code to be a bit more within Drupal's code guide. Not fixed everywhere, but started to get it into a standard (including removing a lot of blank lines!)
*Bug fix - if the anonymous status was 'anon_by_cookie' then then poll would not show as intended due to a missing ->fetchField
I also added a slight improvement, where if you don't have permissions to vote on or view the results, you can still see the options of the poll. I thought this made sense, as otherwise you see a question but no options for it.
Hope this can be of help to someone if you're having any issues with the 7.x branch.
Thanks,
Edwin
Comment | File | Size | Author |
---|---|---|---|
bug_fixes_and_improvements.patch | 20.49 KB | ewills |
Comments
Comment #1
joecanti CreditAttribution: joecanti commentedHi Edwin,
Does this fix the errors on the field page and the node page? Would it be possible to get a zip of the patched module?
Thanks, Joe
Comment #2
k.skarlatos CreditAttribution: k.skarlatos commentedHi, i am interested in this module, is it still maintained?
Comment #3
ewills CreditAttribution: ewills commentedHi guys,
Sorry - for some reason I didn't get a notification of any replies to this issue!
Joe - please see http://drupal.org/project/pollfield/git-instructions for how to apply a patch - it's really useful once you know how, also it was so long since I made the patch I'm not quite sure if it fixes your errors. Create a new issue if not, and ping me a message and I'll see if I can work out a patch.
Aegean - I'm afraid I'm not the maintainer, so not sure on this one. Doesn't seem to have been much in the way of releases recently though.
Comment #4
Maks CreditAttribution: Maks commentedHi Edwin,
Thank you very much for this work!
After applying your patch, Poll works without problems. But an error when setting up the field.
Notice: unserialize() [function.unserialize]: Error at offset 0 of 1 bytes in pollfield_field_widget_form() (line 337...... /pollfield/pollfield.module).
Notice: Undefined index: node in pollfield_field_widget_form() (line 341 ...../pollfield/pollfield.module).
Notice: Trying to get property of non-object in pollfield_field_widget_form() (line 341 ...../pollfield/pollfield.module).
Notice: Undefined index: #node in pollfield_field_widget_form() (line 352 .... /pollfield/pollfield.module).
Notice: Trying to get property of non-object in pollfield_field_widget_form() (line 352 .... /pollfield/pollfield.module).
Warning: Invalid argument supplied for foreach() in pollfield_field_widget_form() (line 352 .... /pollfield/pollfield.module).
Notice: Undefined variable: field_lang in pollfield_field_widget_form() (line 355 ...../pollfield.module)
2
When I try to edit a node that has a Poll:
Notice: Undefined offset: 0 in pollfield_field_widget_form() (line 337 .../pollfield/pollfield.module).
Notice: Undefined variable: field_lang in pollfield_field_widget_form() (line 355 .../pollfield/pollfield.module).
3
I can not add more options CHOICE
Comment #5
ewills CreditAttribution: ewills commentedHmm that looks like a new problem to me - I'd open up a new issue for this and see if anyone else is experiencing the same thing
Comment #6
Pafla CreditAttribution: Pafla commentedHi
#4
I got this too
http://drupal.org/node/1789770
Pafla
Comment #7
Oleksa-1 CreditAttribution: Oleksa-1 commentedClosed as duplicate of issue http://drupal.org/node/1345600