Download & Extend

Error in INSERT INTO: Column count doesn't match value count at row 1 query

Project:File (Field) Paths
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

When saving the settings of a filefield in 'Manage fields' / Configure, I get the following error:

user warning: Column count doesn't match value count at row 1 query: INSERT INTO filefield_paths (type, field, filename, filepath, filealias) VALUES (...) in filefield_paths/filefield_paths.module on line 281.

The following mini-patch seems to fix this here:

<?php
     db_query
(
-     
"INSERT INTO {filefield_paths} (type, field, filename, filepath, filealias) VALUES ('%s', '%s', '%s', '%s')",
+     
"INSERT INTO {filefield_paths} (type, field, filename, filepath, filealias) VALUES ('%s', '%s', '%s', '%s', '%s')",
      
$ffp['type'], $ffp['name'], serialize($settings['filename']), serialize($settings['filepath']), serialize($settings['filealias'])
     );
?>

Comments

#1

Confirmed. Both the bug and solution

#2

Status:needs review» reviewed & tested by the community

Yes, this has been a known issue for a ridiculous amount of time, but I haven't had any time to dedicate to module development.
Will push out fix tonight.

#3

Status:reviewed & tested by the community» fixed

Committed to HEAD

#4

Committed to DRUPAL-5

#5

Status:fixed» closed (fixed)

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

nobody click here