I encounter the following SQL error after upgrading from the 2010-Feb-02 version of 6.x-1.x-dev to the 2010-Mar-09 version:
user warning: Column count doesn't match value count at row 1 query: INSERT INTO forward_log (path, type, timestamp) VALUES ('node/119', 'SENT', 1268336279, 3, '159.87.39.14') in /home/drupal/task/sites/all/modules/forward/forward.module on line 798.

First, I just replaced the module folder and ran update.php which successfully executed some table changes. Then I tried disabling and uninstalling the module before re-enabling it. I am not sure if the uninstall did much because I still could see my settings for the forward module after re-enabling it.
What additional information can I get you?

Comments

Ela’s picture

I just installed this module (fresh install) 6.dev version and I think I have the same problem.
I get the following error in "recent log entries"
Column count doesn't match value count at row 1 query: INSERT INTO forward_log (path, type, timestamp) VALUES ('node/26', 'SENT', 1268342043, 0, '24.105.210.253') in /home/.../public_html/sites/all/modules/forward/forward.module on line 798.

Also.. Forward Tracker in admin/reports/forward is empty even though I've been sending nodes..
It says "No one has used Forward yet.".. I've used it as logged in and as anonymous..

seanr’s picture

Status: Active » Fixed

Just posted a new release which fixes this. It should be up in a few minutes. Thanks.

Ela’s picture

Great! :) is that the 6.x-1.14 release I see available now or do we wait for 6x.dev?

Ela’s picture

Tried 6.x-1.14 release, run update.php ..same problem

TechnoBuddhist’s picture

fix for this is easy. The table has correctly been updated with the new fields, it's the SQL that needs updating...

in /sites/all/modules/forward/forward.module on line 798 change...

db_query("INSERT INTO {forward_log} (path, type, timestamp) VALUES ('%s', '%s', %d, %d, '%s')", $form_state['values']['path'], 'SENT', time(), $user->uid, ip_address());

to
db_query("INSERT INTO {forward_log} (path, type, timestamp, uid, hostname) VALUES ('%s', '%s', %d, %d, '%s')", $form_state['values']['path'], 'SENT', time(), $user->uid, ip_address());

The fields ", uid, hostname" were missing. This works for me now, but obviously it's Dev's job to confirm and provide a proper patch/release.

pivica’s picture

Status: Fixed » Reviewed & tested by the community

#5 works nicely, thanks.

john.oltman’s picture

Status: Reviewed & tested by the community » Closed (fixed)