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

madsph’s picture

I 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!

Island Usurper’s picture

Status: Needs review » Closed (duplicate)