Despite configuring the Upsell block to display for all users, it only seems to display when I'm logged in as the Drupal administrator.

Any pointers as to what I might do to fix this will be greatly appreciated....

CommentFileSizeAuthor
#9 block-caching.patch759 bytestorgospizza

Comments

glowkeeper’s picture

I seem to have fixed this by setting the cache field in the uc_upsell row of database table 'block', to -1 from 1.

torgospizza’s picture

Status: Active » Fixed

I was going to suggest simply clearing your blocks cache to do the trick. That's the first time I've heard of this behavior but I'm not surprised. Glad you got it working.

ericwongcm’s picture

Somehow disabling and re-enabling block cache seems to fixed this issue for me.

Thanks
Eric

torgospizza’s picture

No problem. Glad you got it solved.

Status: Fixed » Closed (fixed)

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

j0rd’s picture

I run into this problem as well.

80% of the time when I'm anonymous the block doesn't show up.

Occasionally it does.

I assume this has something to do with caching. Setting cache setting in block table to -1, does not resolve the issue for me.

Clearing the cache with admin menu / devel does not resolve the issue for me.

Shows up 100% of the time, when admin is logged in.

Something funky going on. Not sure what.

ericwongcm’s picture

Version: 6.x-1.15 » 6.x-1.16
Status: Closed (fixed) » Active

Hi,

I think the problem is still there. I noticed that if block cache is disabled, upsell block shows for anonymous users (no login), if block cache enabled, it only shows if you login.

Cheers
Eric

torgospizza’s picture

Yep, turns out this is something I overlooked. Block caching by default uses a "per-role" setting, meaning the cached content can change depending on the role of the user viewing it.

I'll look into getting this patched up.

torgospizza’s picture

StatusFileSize
new759 bytes

Here is a patch that adds a per-page caching flag for the block, along with a couple other things. Let me know if it solves the issue (you may need to clear your cache after you apply the patch).

franklca’s picture

Nevermind, I found the Paypal link in the readme.txt file :) - (edit) oops, sorry posted on wrong thread

torgospizza’s picture

Status: Active » Fixed

Committed. (Has been for a while, actually.)

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

I just upgraded to newest uc (2.4) and uc_upsell (6.x-1.21), which includes the patch above, and I still have this issue. Works for logged in users, but not for anonymous.

My block cache is disabled, I guess because I'm using some content access modules. I've changed the cache value to -1 in the block table.

Any other suggestions?

Thanks.

davepoon’s picture

It's happening to me, doesn't show for anonymous users...
Suddenly it's working after going to the /cart page...