Download & Extend

UC Option Image doesn't work with required attributes

Project:Ubercart Option Images
Version:6.x-1.x-dev
Component:User interface
Category:bug report
Priority:major
Assigned:Unassigned
Status:active

Issue Summary

Hey guys,

when I have required attribute, uc option image doesn't work correct.

Can you look on it?

Thanks

yannick

Comments

#1

I can confirm the same issue. Making the attribute not-required fixes the bug, and then the images show. Is this perhaps a problem with the way Ubercart deals with required attributes?

#2

+1 didn´t it used to work?

#3

Subscribing - It did used to work. I've got the same problem. As soon as I make an Attribute required - the images don't show up.

#4

Confirm, I disabled required attribute and the first image shows up, but the image does not change when selecting different selection, in either radio buttons, or select field.

#5

My problem is that my option (color) jumps to the first (white) but the option image isn't shown up.

I cannot understand why the module selects the first element via js.

Please let us bring the module forward :c

#6

Is there a way around this to make this work with setting the required field?

#7

Attached patch fixes the issue with required attributes.

AttachmentSize
ucoi-required-attributes-907966-7.patch 1.9 KB

#8

The patch is not applying for me on the dev release from July 12, 2011. What dev are you using with this patch? Thanks for the help!

error: while searching for:
*/
function theme_uc_option_image($aid, $file, $size = '_original', $node) {
  $shownoimage = TRUE;

  if (!variable_get('uc_option_image_show_noimage', FALSE) && $file->filename == 'option_image_0_0_0') {
    $file->filepath = NULL;
    $shownoimage = FALSE;
  }


error: patch failed: uc_option_image.module:597
error: uc_option_image.module: patch does not apply

#9

The patch was against git, 6.x dev branch.

#10

The current dev version on git is what I attempted to patch as well. Has something changed since your patch was made?

#11

It doesn't look like they have made any commits lately but I was developing this patch after I had patched a few other issues so the line numbers may be off a bit. I just re-tested after a fresh checkout and it applies cleanly on git branch 6.x-1.x with fuzz enabled:

patching file uc_option_image.module
Hunk #1 succeeded at 84 (offset 2 lines).
Hunk #2 succeeded at 590 with fuzz 2 (offset -12 lines).
Hunk #3 succeeded at 609 (offset -12 lines).