I set up my site in the following order: Set up image support, run the auto-configure procedure for images, create some products. I then decided to enable the Product Kit module, and create some Product Kits. I discovered that I had to add the Image field to the Product Kit content type by hand (maybe that's another bug, and it should be done for you?) and added images.

However the image I had uploaded didn't display - either when viewing the detail of the Product Kit (blank), or when viewing the catalog section containing the PK (text "n/a" instead of the image).

The "Store Administation" homepage for my site gave me the cryptic advise to "make sure it is set as the Ubercart image in the content type settings under the Workflow fieldset." The Workflow fieldset for the Content Type settings for Product Kit didn't contain any such option, so I was stuck.

A bit more digging, and I discovered that I had to create an entry in the Variable database table with name = 'uc_image_product_kit' and value = 's:17:"field_image_cache"'. Ubercart had done this for me with the Product content type, but not for the Product Kit content type. There was nowhere in the UI to set that variable for me, and no documentation to tell me to venture into PHPMyAdmin and do it by hand. Querying the variable table with some intelligent guesses led me to the row for uc_image_product, and I guessed a corresponding row might be required.

I'm not sure what the correct behaviour should be, but the UI should do more for the site administrator than it does at present.

CommentFileSizeAuthor
#2 product_kit_automatic_image.patch486 bytesIsland Usurper
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

guodskrap’s picture

I have been fighting this for days. Thanks for finding the problem!

Update: Cross-posted this on the Ubercart forums:
http://www.ubercart.org/forum/support/10096/image_support_not_automatica...

Island Usurper’s picture

Priority: Critical » Normal
Status: Active » Needs review
FileSize
486 bytes

It's not the Workflow fieldset, but the one below it called "Ubercart product settings". I've just fixed that message to point people in the right direction.

Here's a patch that adds the image field to product kits when the module is enabled. That should help, too.

JamesOakley’s picture

All I've got in my Content Type screen is the "Identification section" (name, type, description), then 3 groups of settings: "Submission form settings", "Workflow settings", "Comment settings". I don't know what I've done differently, but I haven't got anything that says "Ubercart Product Settings" on mine.

I'm genuinely puzzled.

Island Usurper’s picture

Oh, that's right. The function that added it was broken in 2.0-beta5 so it wasn't displayed.

...And I haven't committed anything to CVS for a while, so it's not in the dev version either. Blargh.

So, the patch should still work for people who don't want to mess with the database. Devel's variable editor would also work. I promise that another version will be released soon.

Committing the patch before I forget it.

Island Usurper’s picture

Status: Needs review » Fixed

Of course I would remember to fix the patch but not update the issue. :P

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ilikegrits’s picture

How do you install this. Do you just put it in the uc_product_kit folder and ftp it up?

Island Usurper’s picture

By now, it's in the 6.x-2.x-dev package, so you can just upgrade to that version of Ubercart.

For any future patches that you want to use or test, read http://drupal.org/patch/apply.