Ubercart Error After Updating From Drupal 5 To Version 6

We recently updated/upgraded a client’s site from Drupal 5 to Drupal 6. This required an upgrade of all of our modules, as well, including Ubercart. We performed the upgrade, and all seemed well, until we noticed orders were no longer being placed. So we took a look at our db log and we saw items similar to the following:

Unknown column 'product_count' in 'field list' query: INSERT INTO uc_orders ...

After we got the fields added back in, we then got this MySQL error:

Duplicate entry '0' for key'PRIMARY' query: INSERT INTO uc_orders ...

After seeing this, we loaded up the ‘sequences’ table and changed the value for ‘uc_orders_order_id’ to a higher number then the last added order, but this also failed with the same error. Doing a quick search, we found out that the ‘sequences’ table was no longer in use in Drupal 6 (I’m lame, I know). So making a quick update:


And tried again, all worked well. I hope this helps someone else down the road!

Posted in PHP Tagged with: , ,