I installed the delicious module and tried to create Blocks, but

user warning: Column count doesn't match value count at row 1 query: INSERT INTO delicious_block (dbid, title, users, tags, maxentries) VALUES (6, 'Matilde\'s links', 'Keizer', 'Matilde', 0, 0, 10) in /home/johannes/public_html/includes/database.mysql.inc on line 172.
Title Max Entries

who can give me a hind?

CommentFileSizeAuthor
#4 delicious.module.patch596 byteseporama@drupal.org

Comments

Keizer’s picture

Assigned: Keizer » Unassigned
Keizer’s picture

well, I assigned this erroneously to myself, but I cannot resolve the problem, Would be really thankful if someone can give advice

deverman’s picture

I just tried to use the delicious module and got the same error. Hope it can be fixed. Let me know if you need more info. I am running drupal 5.7.

eporama@drupal.org’s picture

StatusFileSize
new596 bytes

Here's a quick patch that seems to do the trick.

663c663
< db_query("INSERT INTO {delicious_block} (dbid, title, users, tags, maxentries) VALUES (%d, '%s', '%s', '%s', %d, %d, %d)", $dbid, $form_values['title'], $form_valu
es['users'], $form_values['tags'], $form_values['display'], $form_values['orderby'], $form_values['maxentries']);
---
> db_query("INSERT INTO {delicious_block} (dbid, title, users, tags, display, orderby, maxentries) VALUES (%d, '%s', '%s', '%s', %d, %d, %d)", $dbid, $form_values['t
itle'], $form_values['users'], $form_values['tags'], $form_values['display'], $form_values['orderby'], $form_values['maxentries']);

Keizer’s picture

thanks for that! Do I need to copy that patch into the Module code?

eporama@drupal.org’s picture

patching a file is a unix (or mac) like process that will automatically figure out the changes and insert them... This was a pretty easy fix, so here's the manual way of doing it.

Open delicious.module and find line 633. Should look like:

db_query("INSERT INTO {delicious_block} (dbid, title, users, tags, maxentries) VALUES (%d, '%s', '%s', '%s', %d, %d, %d)", $dbid, $form_values['title'], $form_values['users'], $form_values['tags'], $form_values['display'], $form_values['orderby'], $form_values['maxentries']);

Then to the first set of columns "(dbid, title, users, tags, maxentries)" add the values "display, orderby, " between tags and maxentries so that you end up with a string of:

db_query("INSERT INTO {delicious_block} (dbid, title, users, tags, display, orderby, maxentries) VALUES (%d, '%s', '%s', '%s', %d, %d, %d)", $dbid, $form_values['title'], $form_values['users'], $form_values['tags'], $form_values['display'], $form_values['orderby'], $form_values['maxentries']);

Anonymous’s picture

Assigned: Unassigned »

Thanks ,

This patch will be pushed out with the next development release for 5.x .

Anonymous’s picture

Status: Active » Closed (fixed)