Submitting content type form destroys poll results

webchick - September 20, 2008 - 07:56
Project:Drupal
Version:7.x-dev
Component:poll.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

This is bizarre.

0. Enable poll module.
1. Enable the Recent polls block.
2. Create a poll.
3. Vote on the poll.
4. Go to the Admin > Site building > Content types
5. Hit "edit" on, say, Article, and fill in some submission guidelines.
6. Save the form, and get this:

    * notice: Undefined property: stdClass::$allowvotes in /Applications/MAMP/htdocs/core/modules/poll/poll.module on line 546.
    * notice: Undefined property: stdClass::$choice in /Applications/MAMP/htdocs/core/modules/poll/poll.module on line 680.
    * warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/core/modules/poll/poll.module on line 680.
    * notice: Undefined property: stdClass::$choice in /Applications/MAMP/htdocs/core/modules/poll/poll.module on line 688.
    * warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/core/modules/poll/poll.module on line 688.

Then, it looks like the poll's votes are cleared or something because there's nada in the right sidebar.

Can anyone else reproduce this?

#1

webchick - September 20, 2008 - 08:02
Title:Bunch-o-errors on content type page with poll block» Submitting content type form destroys poll results

Oh, wait. It's doing a node_load() of the latest poll where the recent poll results used to be..? And saying there are 0 votes?

Poll WTF?

Please excuse my horrid colour scheme. ;)

#2

webchick - September 20, 2008 - 08:05
Priority:normal» critical

Ok, more weirdness.

So those errors show up on every page of the site... until! You CLEAR THE CACHE at admin/settings/performance. Then suddenly everything's hunky dory. Huh.

Anyway, I would say spewing errors all over your site and pretending to delete your votes qualifies as a critical bug. :P

#3

catch - September 20, 2008 - 08:20

Have an open issue here for similar notices, although steps to reproduce are different: #277162: Undefined property when viewing poll results from two sessions with the same user

#4

Damien Tournoud - September 20, 2008 - 12:48

The fact that editing a poll clears results is not really new (you can test it on gdo...). The strange behavior of the block looks related to block caching.

#5

catch - September 20, 2008 - 19:28

Editing a poll clearing results has been fixed in Drupal 7 and 6 though (and there's a waiting backport for 5).

#6

Jody Lynn - October 18, 2008 - 01:27
Priority:critical» normal

I followed the steps in #1 and could not reproduce. Setting to normal priority until someone can reproduce the error.

 
 

Drupal is a registered trademark of Dries Buytaert.