Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I create a new taxrate i get the following error:
user warning: Column count doesn't match value count at row 1 query: INSERT INTO uc_taxes (name, rate, taxed_product_types, taxed_line_items, weight, shippable) VALUES (0, '0.1', 0, 'a:1:{s:7:\"generic\";s:7:\"generic\";}', '0', 0, 0)
This is caused by uc_taxes.admin.inc line 122:
db_query("INSERT INTO {uc_taxes} (name, rate, taxed_product_types, taxed_line_items, weight, shippable) VALUES (%d, '%s', %f, '%s', '%s', %d, %d)",
Notice how 7 values are inserted into 6 columns. This bug is fixed by removing the first %d so the line reads:
db_query("INSERT INTO {uc_taxes} (name, rate, taxed_product_types, taxed_line_items, weight, shippable) VALUES ('%s', %f, '%s', '%s', %d, %d)",
Thank you for a great module!
madsph
Comments
Comment #1
madsph CreditAttribution: madsph commentedI tried to see if this had already been reported before reporting. It turns out I missed it anyway.
This report duplicates #374629: Can't define tax rate .
Sorry for that!
Comment #2
Island Usurper CreditAttribution: Island Usurper commented