| Project: | Order Updates |
| Component: | Code |
| Category: | |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
When saving a shipment with the "Ship Manually" method, the shipment is not saved, and the following error message is given:
user warning: Field 'o_first_name' doesn't have a default value query: INSERT INTO uc_shipments (sid, order_id) VALUES (5, 10) in C:\Zend\Apache2\htdocs\drupal\includes\database.mysql.inc on line 174.The source of the problem seems to be in uc_shipping.module on line number 1269, where it executes the following code:
db_query("INSERT INTO {uc_shipments} (sid, order_id) VALUES (%d, %d)", $shipment->sid, $shipment->order_id);All of the columns for the table UC_SHIPMENTS are NOT NULL, and only one column has a default value.
Basically, the problem seems to either be that this insert statement is not saving enough of the shipment information, or the CREATE TABLE statement (MySQL version) in uc_shipping.install needs to be altered to give default values to the columns.
The PostgreSQL version of the table creation seems to have all of the columns with the correct default values.
UPDATE
==============
Project changed to Ubercart.

