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?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | delicious.module.patch | 596 bytes | eporama@drupal.org |
Comments
Comment #1
Keizer commentedComment #2
Keizer commentedwell, I assigned this erroneously to myself, but I cannot resolve the problem, Would be really thankful if someone can give advice
Comment #3
deverman commentedI 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.
Comment #4
eporama@drupal.org commentedHere'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']);
Comment #5
Keizer commentedthanks for that! Do I need to copy that patch into the Module code?
Comment #6
eporama@drupal.org commentedpatching 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']);Comment #7
Anonymous (not verified) commentedThanks ,
This patch will be pushed out with the next development release for 5.x .
Comment #8
Anonymous (not verified) commented