I think I've missed the solution

Posts: 28
Joined: 08/27/2007

Okay, so I'm getting an error very much like others have described in previous forum posts; in one of those posts one of our admirable administrators mentioned he would fix the issue. However, I'm not able to find the fix. The error is when adding new products, and goes something like this:

warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, 'uc_product_add_to_cart_form_' was given in mysite/includes/form.inc on line 217.

Can anyone offer a solution?

Keep up the great work guys! Thanks!

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

Do you have the latest version of Übercart? This should be fixed in Alpha 7e, and possibly earlier.

Posts: 28
Joined: 08/27/2007

I'm running Alpha b, so I'll upgrade to e. When I run the update, do I need to delete the entire ubercart directory before uploading the new directories, or can I just write them over? Thanks!

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

I think 7b was before the modules were moved, so you'll want to backup the ubercart directory to a zip file or tarball, delete the directory, and put the new one in its place. Then you can run the update script as normal.

Posts: 28
Joined: 08/27/2007

Okay, I did all that but now I'm getting warnings on the front page:

* user warning: Unknown column 'street1' in 'field list' query: SELECT first_name, last_name, company, street1, street2, city, zone, postal_code, country FROM uc_quote_product_locations WHERE nid = 13 in /home/turnkeyc/public_html/drupal-5.2/includes/database.mysql.inc on line 172.
* user warning: Unknown column 'street1' in 'field list' query: SELECT first_name, last_name, company, street1, street2, city, zone, postal_code, country FROM uc_quote_manufacturer_locations WHERE tid = 0 in /home/turnkeyc/public_html/drupal-5.2/includes/database.mysql.inc on line 172.

I checked an earlier post by someone who had this problem, and they indicated that they ran the update.php. I had already done this, but I tried it again. When I ran it, I got:

* user warning: Unknown column 'notify' in 'uc_order_statuses' query: ALTER TABLE uc_order_statuses CHANGE notify state VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL default '' in /home/turnkeyc/public_html/drupal-5.2/includes/database.mysql.inc on line 172.
* user warning: Duplicate column name 'weight' query: ALTER TABLE uc_order_statuses ADD weight MEDIUMINT(9) NOT NULL in /home/turnkeyc/public_html/drupal-5.2/includes/database.mysql.inc on line 172.
* user warning: Duplicate column name 'locked' query: ALTER TABLE uc_order_statuses ADD locked TINYINT NOT NULL DEFAULT '0' in /home/turnkeyc/public_html/drupal-5.2/includes/database.mysql.inc on line 172.

And here's the log, with three failures:

uc_payment module
Update #2

* ALTER TABLE {uc_order_statuses} CHANGE order_status_id order_status_id VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL default ''
* ALTER TABLE {uc_order_statuses} CHANGE title title VARCHAR(48) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL default ''
* Failed: ALTER TABLE {uc_order_statuses} CHANGE notify state VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL default ''
* Failed: ALTER TABLE {uc_order_statuses} ADD weight MEDIUMINT(9) NOT NULL
* Failed: ALTER TABLE {uc_order_statuses} ADD locked TINYINT NOT NULL DEFAULT '0'
* DELETE FROM {uc_order_statuses} WHERE order_status_id LIKE '_'
* INSERT INTO {uc_order_statuses} (order_status_id, title, state, weight, locked) VALUES ('payment_received', 'Payment received', 'payment_received', 10, 1);

uc_paypal module
Update #1

* INSERT INTO {uc_order_statuses} (order_status_id, title, state, weight, locked) VALUES ('paypal_pending', 'PayPal pending', 'payment_received', 7, 1);

uc_quote module
Update #3

* ALTER TABLE {uc_quote_manufacturer_locations} CHANGE COLUMN address1 street1 varchar(255) NOT NULL default ''
* ALTER TABLE {uc_quote_manufacturer_locations} CHANGE COLUMN address2 street2 varchar(255) NOT NULL default ''
* ALTER TABLE {uc_quote_product_locations} CHANGE COLUMN address1 street1 varchar(255) NOT NULL default ''
* ALTER TABLE {uc_quote_product_locations} CHANGE COLUMN address2 street2 varchar(255) NOT NULL default ''

Can you offer any ideas on this?

Thanks for all your help!

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

Those errors on the front page should go away now that those queries have been run, particularly the ones for uc_quote.

The only failed query I'm worried about is the first one: "ALTER TABLE {uc_order_statuses} CHANGE notify state ...". Does that table match the table that would be created by uc_order_install()?

Posts: 28
Joined: 08/27/2007

I'm not sure -- I don't know much about databases; but I can look at it and figure it out if you tell me what I'm looking for. What should I be looking at in the SQL database? Thanks, again, for sticking with me on this. ** On another note, entering products seems to be working fine other than that the photos aren't showing up in lists or on the item display (it has a clickable filename that opens up a lightbox of the image instead). In any case, I'm working through the forums for a solution to that one; but just wanted to let you know that the products seem to be entering correctly otherwise. **

Thanks!

Posts: 2244
Joined: 08/07/2007
AdministratoreLiTe!

If you look at the structure of the order_statuses table, especially if you export it as SQL commands, it should have the same columns and data types the statement in uc_order_install() that starts with "CREATE TABLE {uc_order_statuses}".

Based on the errors that you got, I'd expect products to work fine. Orders, especially when they change status might be a little funky if there's a problem with that table. (I think there is a problem, but I'm not sure.)

Since the Thickbox is pointing to the actual image, we know that the image field is working. Check the settings for imagecache. There may be a link in the store status table on the Store administration page that should set it up correctly. If that doesn't work, we can try a few more things.

Posts: 28
Joined: 08/27/2007

Lyle, I truly appreciate your gracious help with my issues. I still need to check the database thing and I'll report back with what I find; perhaps this post will help someone else if they run into similar problems. As for the images, I don't see a store status table; on the list view the image field is there with no image; on the product view only the link to the image is there. I've checked image cache and scoured my UC table settings and it seems as if I've got everything set correctly. Of course, it wouldn't be the first time I've overlooked the obvious if I have something set wrong. Can you offer any additional suggestions?

Thanks again! B

Posts: 28
Joined: 08/27/2007

Lyle,

Still no dice with my images. I've tried resetting permissions and scoured the settings, but no luck.

Can you offer any other suggestions?

Thanks!

B