Closed (fixed)
Project:
Pollfield
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2009 at 11:19 UTC
Updated:
18 Nov 2009 at 11:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
mario_prkos commentedDid you create new poll or this is a old one? This bug is referred to fact that serialization of fields is not done properly and wrong data is put in database. I have the same copy of dev version on my laptop and I created new poll and try published unpublished stuff and did not find any problem. Then I tried another one with same success. Can you try recreate poll then check it out if you have same problem you can post what did you do so I can reproduce it.
Thanks for your effort. This will be best tested module in drupal :).
Comment #2
dddave commentedOk, did some testing of this.
First of all, this is no longer about un/republishing content. You were also right that creating a new poll works well and empty fields don't show.
BUT: Any editing of the pollfield settings (e.g.: changing the text of a choice, disallow that results are shown etc.) makes the empty field appear.
I tested this with a couple of scenarios/settings and it really narrows down to the bogus handling of node editing.
Comment #3
Wayne Ashley commentedHi,
I resolved this problem by replacing the following lines
if (!empty($choices)) {
foreach ($choices as $delta => $choice) {
$list[$delta] = check_plain($choice['choice']);
}
//choose form for specific type of poll
WITH
if (!empty($choices)) {
foreach ($choices as $delta => $choice) {
if (!empty($choice['choice'])){
$list[$delta] = check_plain($choice['choice']);
}
}
//choose form for specific type of poll
Don't know if this is the best way to go about fixing the issue, but hopefully will help point to it's cause.
Comment #4
oxigen commentedWayne, this patch fixed this issue. Thanks a lot.
Comment #5
mario_prkos commentedThank you for your contribution Wayne, this patch will be included i dev version and will be included in next release.
Comment #6
burningdog commentedThe fix worked for me too - I've rolled a patch in case someone needs to apply it before the next release.
Comment #7
dddave commentedPatch works well. Looking forward to the new release.
Thx!