I have a Poll content type that works fine. I thought it would be nice when forum users can post their poll too. I added the forum taxonomy reference to the poll content type and made it not obligatory (to be able to post polls elsewhere).

Now when I create a new poll I see the following notices appear:

Notice: Undefined property: stdClass::$active in poll_load() (line 507 of /var/www/modules/poll/poll.module).
Notice: Undefined property: stdClass::$choice in poll_tokens() (line 58 of /var/www/modules/poll/poll.tokens.inc).
Warning: Invalid argument supplied for foreach() in poll_tokens() (line 58 of /var/www/modules/poll/poll.tokens.inc).
Notice: Undefined property: stdClass::$choice in poll_tokens() (line 58 of /var/www/modules/poll/poll.tokens.inc).
Warning: Invalid argument supplied for foreach() in poll_tokens() (line 58 of /var/www/modules/poll/poll.tokens.inc).

When I save the poll I see:

Error message
Notice: Undefined property: stdClass::$active in poll_load() (line 507 of /var/www/modules/poll/poll.module).

After saving the poll behaves normal, but it gives me the suspicion that this relates to another problem I notice when using the convert module to change a forum topic into a forum poll. The resulting poll fails to recognise the active state. No matter what the status or expiry, never becomes votable.

CommentFileSizeAuthor
#1 poll_undefined_property-2035061-1.patch677 bytesbalis_m
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

balis_m’s picture

I had the same issue and i solved it with this patch

Version: 7.22 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.