Closed (won't fix)
Project:
Ubercart Option Images
Version:
5.x-1.0-3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Sep 2008 at 02:44 UTC
Updated:
5 Dec 2010 at 05:37 UTC
Inside the view case of uc_option_image_nodeapi, you're checking if a node has attributes, but not whether the option_images have been loaded in the load case. This means that even in cases where an image shouldn't be shown, this module is trying to show one.
I've added a test for $node->option_images, and if none is found, no attribute images are shown. I think you could probably ditch the check of node attributes and just check for the option_images since that work was already done in the load step, but my experience with this module is limited, and I didn't want to screw anything up.
The attached patch seems to take care of this without ill effects.
| Comment | File | Size | Author |
|---|---|---|---|
| uc_option_image.patch | 614 bytes | chellman |
Comments
Comment #1
scottrigbyHi chellman, patch works like a charm - Nice work ;)
Marking RTBC because it doesn't look like this is going to get tons of people testing this -- though ideally it'd be integrated into the next release if the is one.
Comment #2
jesperholm commentedWhere am I supposed to put the code? I'm guessing in the uc_option_image.module, but where?
I just tacked it on the end, and it blocked the view of my whole site!
Comment #3
chellman commented@jesperholm: This is a patch. Learn how to use it here: http://drupal.org/patch/apply
Comment #4
jesperholm commentedOk. Applied the patch, but I still get the camera with a red strike-through as my default picture, even though there is no image set. Don't know what I'm doing wrong, but it's a bit frustrating. My other problem is that the option images are getting saved to the wrong link. I know it's not this post, but I'm now getting any help from other sources, so maybe someone could help.
I attach the image by cycling through to the right link (localhost:8888/mysitename/sites/default/files/option-images/eg_0.jpg) and the default image is fine, but when it comes time to choose the option, the link changes to localhost:8888/sites/default/files/option-images/eg_0.jpg without the 'mysitename' in the link, and all I get is the evil blue question mark of death. It seemed to work the first time I tried it, but now none of them work! HELP!
Comment #5
donquixote commentedsubscribe
Comment #6
acouch commentedThe 5.x version is no longer being supported for this module. We are cleaning up the 6.x version and preparing for the 7.x version.