hey there,

running D6, Ü2 (that's Übercart 6.x-2.0-rc1), CCK 6.x-2.2, image 6.x-1.0-alpha4 and imagecache 6.x-2.0-beta9.

as I was going to post the first product on a fresh install, I got this error:

user warning: Table 'example.uc_upsell_products' doesn't exist query: SELECT related_products FROM uc_upsell_products WHERE nid = 0 in /home/example/public_html/example/sites/example.com/modules/ubercart/contrib/uc_upsell/uc_upsell_admin.inc on line 21.

maybe it's what we see when there's no products yet on the catalog? even so, it's not supposed to display an error message, now is it?

if you need any more details, please let me know.

cheers,
Luciano

Comments

torgospizza’s picture

Well that means the Install file didn't fire the Table creation script correctly... even though it's worked in my testing. Are you using MySQL?

torgospizza’s picture

BTW I just tested a clean Install of Upsell 6.x-1.13 on D6, and it worked fine... are you doing anything special with your database tables? Any shared tables, stuff like that going on?

luco’s picture

well, all my MYSQL tables *do* begin with my username in my hosting plan (username_tablename). is that it?

oh and I'm setting up a multisite, where a store is one of the sites.

does this affect UC_Upsell in any way?

torgospizza’s picture

Yeah, that explains it, I think. The table uc_upsell_products is set to be a shared table - meaning in the code, it has been wrapped in {curly braces}. If that's a multisite setting you can change, you might need to do that - either that, or I should force my table to not be shared by removing those braces.

luco’s picture

um, what's the upside to having upsell tables shared?

I ask because an environment such as mine is pretty common. shared hosts, multisite, multiple domains... the works.

there could be an advanced setting like "share upsell tables" that the user could switch on. it could default to off and explain why. it could also tell which are the pros and cons for each option.

what do you think?

torgospizza’s picture

That might not be a bad idea, keep in mind this is really only an option for a multisite setup. I think as long as you setup each instance of the module for its own site, that's the only time this would make a difference. I'll have to read up on it some more, but it seems like the default behavior should be all you need, unless you don't want to share Upsell products between sites. I'll think about it and see if there's an option or other config that will work for this scenario.

luco’s picture

thanks, Torgos.

so after your fix this issue, that error message should disappear and I should be able to add upsell products even on shared hosting environments - right?

torgospizza’s picture

luco, sorry for the delay. I'll be committing a new dev branch which I think will fix the issue. I was inconsistent with my usage of curly braces, which may have been leading to your issue.

The new dev branch will be up soon. Please test that when you can.

luco’s picture

alright, thanks.

I've been swamped lately, but I'll try and give it a shot once it's released.

from the start I just thought "hey, if it's highly technical then someone must need it" - but we could get a less technical solution on demand, right?

torgospizza’s picture

Status: Active » Fixed

No response here for a while so I'm going to assume it's been fixed... haven't heard of others having the same issue.

Status: Fixed » Closed (fixed)

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