This is Drupal 6.6. I installed AP and adjusted user permissions to allow voting. The poll displays without options nor anywhere to click to vote.
I'm getting this error on one of my pages:
warning: Invalid argument supplied for foreach() in /home/adrkitsap/drupal-6.6/sites/all/modules/advpoll/advpoll.module on line 275.
I don't even know where to begin troubleshooting this one. Just wanted to report it so you'll know how the 6.x port is doing.
Comments
Comment #1
alan426 commentedNever mind ... I had set an expiration date. Poll is displaying properly, however, I'm still getting the "Invalid argument" warning on certain pages.
Comment #2
alan426 commentedComment #3
alan426 commentedMore info. Here's what's in the module , beginning line 273:
function _advpoll_writeins_access($node) {
user_access('administer polls');
foreach ($node->choice as $choice) {
if ($choice['writein']) {
// Has at least one write-in choice.
return TRUE;
}
}
return FALSE;
}
$node->choice is not defined in this context. Putting an if ($node->choice) {} around the foreach loop clears the error.
Comment #4
alan426 commentedComment #5
Walt Esquivel commentedI received a similar error today:
I'd rather not mess with the code so I'll wait for the code fix. Thanks.
Comment #6
ChrisKennedy commentedWhat pages and poll types does this occur on? What actions trigger it?
Comment #7
Navinjohnson commentedFor me it happens on every node page with user generated content that you navigate to. Not just polls.
Comment #8
davidcomelli commentedwarning: Invalid argument supplied for foreach() in /home/a2425063/public_html/sites/all/modules/advpoll/advpoll.module on line 275.
I'm getting this same error when I go directly to a page node and a picture node.
No other places is this error showing up for me.
Comment #9
georgedamonkey commentedFor me, it appears on every page.
Comment #10
davidcomelli commentedInstalled the update today
Drupal 6.8 Advanced Poll 6.x-1.x-dev (2008-Dec-30)
Still getting the problem with I'm looking at the Individual nodes. Any Ideas?
Comment #11
ChrisKennedy commentedOkay I think I fixed it. If you check out the latest code from CVS or get the new build tomorrow it should work.
Comment #12
Navinjohnson commentedWorks for me on all pages, Chris. Thanks!
Comment #13
ChrisKennedy commentedSchweet.