Apparently there is some contention between the queue module and the poll module, so this is only a problem when both modules are enabled.

Both modules use a node->voters variable. The queue module defines this as an array, while the poll module defines this as a string. This causes the poll module to only update the poll.voted column with the last user that has voted, so this only disallows the latest voter as the poll.voted column's data is overwritten after each vote.

The best possible fix would probably be to rename the poll.voted column to poll.polled and update the code accordingly. As an interim, I propose the following patch which modifies the query to SELECT votes as polled. This also modifies relevant code to use node->polled instead of node->voted. If the database is modified to accomodate the poll.polled column instead of the poll.voted column, this would then require minimal code change to sync the code to the database.

CommentFileSizeAuthor
#1 poll_polled2.patch2.92 KBcprice
poll_polled.patch1.74 KBcprice
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cprice’s picture

FileSize
2.92 KB

I've reworked this patch to update the database via update.php and remove the crude workaround. So this patch is no longer a crude hack, but the final solution I proposed previously.

Steven’s picture

I applied this patch to HEAD. I added a PGSQL upgrade path.

Also, your patch contained two tab characters. Please avoid that in the future.

Gábor Hojtsy’s picture

Although and upgrade path was provided, the .mysql and .pgsql files were not changed to reflect the new column names, so new installations will fail! Please update. No patch attached, since the change is trivial.

Dries’s picture

Fixed in HEAD.

jhriggs’s picture

Priority: Normal » Critical

database.mysql and database.pgsql were updated, but updates.inc was not, so upgrades are now broken! The patch included the udpates.inc changes...

jhriggs’s picture

Nevermind. It is in there, but must have made it as part of another commit...

Anonymous’s picture