Hello, I've been working on a test site using Drupal 4.6, I've just updated to the latest CVS as of a few hours ago, and have run the update.php. I've found that voting for nodes using the queue module doesn't work.

The module attempts to insert the chosen option value submitted by the voting form, but this value is "+ 1", "+ 0", or "- 1", with spaces, and this doesn't work - no matter how you vote, the value recorded in the database is "0", so the node is never promoted.

I've changed line 166 of queue.module to fix this (sorry for the lack of a proper patch):

$votes = array('0' => t('neutral (+0)'), '1' => t('post it (+1)'), '-1' => t('dump it (-1)'));

This records the votes properly in the database, however, I don't think this is a complete fix; after enough users have voted for a story to promote it, I get this error:

user error: Duplicate entry '2-18' for key 1
query: INSERT INTO term_node (nid, tid) VALUES (18, 2) in C:\www\yabancikoy.com\docs\includes\database.mysql.inc on line 66.

This module looks like it needs a bit of attention before it's released, I haven't got much time at the moment to poke into it more deeply, although if nobody else fixes it in the near future I will probably get around to it eventually since I really want to use this feature.

Thanks,
Kief

CommentFileSizeAuthor
#3 queue_2.patch758 byteskilles@www.drop.org

Comments

killes@www.drop.org’s picture

Did you run update.php?

Kief’s picture

Yes.

killes@www.drop.org’s picture

StatusFileSize
new758 bytes

Ok, I made a patch as you indicated. Shouldn't harm at least. Should be applied to 4.6 and cvs.

the term_node error is unrelated and addressed in a separate issue.

dries’s picture

Committed to HEAD. Thanks.

Anonymous’s picture