When creating a nodequeue and leaving 'Link "add to queue" text' empty, a SQL error is thrown:

General error: 1366 Incorrect integer value: '' for column 'show_in_links' at row 1
in nodequeue_save() line 1936

This is from HEAD, last updated: October 7, 2010.

Proposed patch attached.

CommentFileSizeAuthor
nodequeue-d7-db-insert-errors-fix.patch497 bytesbrenk28

Comments

recidive’s picture

Title: SQL Error on node creation » SQL Error on nodequeue creation
Status: Active » Needs review

The patch fixes the issue. Although I'm not sure this is the best way to fix this.

We may want to add constants to 1 and 0 just like core does in Drupal 7 for e.g. node.sticky.

It's a shame we don't have boolean fields and have to reinvent the FALSE/TRUE wheel.

recidive’s picture

Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community

Ok, better with this patch than without it.

HaKi’s picture

i applied the patch now i get this

Recoverable fatal error: Argument 2 passed to db_query() must be an array, string given, called in /home/hakan/turkiyelim.org/www/drupal/sites/all/modules/nodequeue/smartqueue.module on line 70 and defined in db_query() (line 2179 of /home/hakan/turkiyelim.org/www/drupal/includes/database/database.inc).
ezra-g’s picture

ezra-g’s picture

Status: Reviewed & tested by the community » Fixed

Committed to the 7.x-2.x branch. Thanks!
http://drupal.org/cvs?commit=470050

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.