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.

CommentFileSizeAuthor
#12 uc_upsell_568686.patch604 bytesaidanlis

Comments

rszrama’s picture

Project: UC Free Order Payment Method » UC Upsell
Version: 6.x-1.0-beta3 » 6.x-1.x-dev

Not sure what the problem is, but I've moved this to the Upsell queue.

torgospizza’s picture

Can you verify you're using the latest Upsell version?

torgospizza’s picture

Status: Active » Postponed (maintainer needs more info)

Could use some more info here. Are you sure you're using the latest Upsell code? Try the dev version first.

earthangelconsulting’s picture

ok, 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

talpa’s picture

stupido errors at sql do you know standard sql or not? Postgresql return lot of basic errors

torgospizza’s picture

Huh?

earthangelconsulting’s picture

yeah, 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

vin247’s picture

Any 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.

torgospizza’s picture

That definitely doesn't help much. Are you using imagecache? Did you configure an image preset to use for your Upsell images?

aidanlis’s picture

Status: Postponed (maintainer needs more info) » Active

All 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.

aidanlis’s picture

Title: Problems when using uc_upsell » Fatal error: Cannot access empty property

Updating the useless title.

aidanlis’s picture

StatusFileSize
new604 bytes

Patch attached.