Hi there,
it seems that the modules gives an update when using uc_upsell.
When I combine a free product with an "upsell" product ("related products for upsell"), I get the following error message when adding the product to the cart:
Fatal error: Cannot access empty property in /sites/all/modules/uc_upsell/uc_upsell.module on line 200
The issue is easy to reproduce, once I remove the upselling product the issue is gone.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | uc_upsell_568686.patch | 604 bytes | aidanlis |
Comments
Comment #1
rszrama commentedNot sure what the problem is, but I've moved this to the Upsell queue.
Comment #2
torgospizzaCan you verify you're using the latest Upsell version?
Comment #3
torgospizzaCould use some more info here. Are you sure you're using the latest Upsell code? Try the dev version first.
Comment #4
earthangelconsulting commentedok, i am getting the same error (just slightly different line number):
Fatal error: Cannot access empty property in /home/xxx/xxx.com/sites/all/modules/uc_upsell/uc_upsell.module on line 220
i am using the 6.x-1.x-dev version, from Feb 25, 2011
and the product i am viewing is not even a free product!
cheers
Peter "Fish" Fisera
Earth Angel Consulting
Comment #5
talpa commentedstupido errors at sql do you know standard sql or not? Postgresql return lot of basic errors
Comment #6
torgospizzaHuh?
Comment #7
earthangelconsulting commentedyeah, not sure what #5 is about, that's for sure! :-)
re: #4, the error i reported is because no image field (or imagecache preset) was set up yet for a product image. but i have created one, and it's still giving the error. i'll see if i can figure out why, and get back to you if i can figure out what's going on there.
you may want to consider tweaking this module so that it doesn't give nasty errors if there's no product image field. i admit that it's rare to use Ubercart without product images, but it's not unheard of.
cheers
Fish
Comment #8
vin247 commentedAny update on a fix for this problem? I can only get the module to work when I comment out the following line:
$imagefield = $node->{$imagefield[0]}[0]['filepath'];
Obviously this disables the images and I'd like to use images with this module so would appreciate any help.
Cheers
**EDIT**
It's all of a sudden decided to work and I'm not sure why, I was doing a bit of configurations here and there but can't point out just what triggered it to work.
Would still like some info on the problem though.
Comment #9
torgospizzaThat definitely doesn't help much. Are you using imagecache? Did you configure an image preset to use for your Upsell images?
Comment #10
aidanlis commentedAll you need to know is that
$imagefield = $node->{$imagefield[0]}[0]['filepath'];will produce a fatal error on some drupal setups.$imagefield[0]is NULL, $node->NULL is a fatal error.This can happen under a variety of circumstances, the easiest way to replicate it is creating a new product class and not creating an associated image field with it.
Comment #11
aidanlis commentedUpdating the useless title.
Comment #12
aidanlis commentedPatch attached.