This is weird.

I'm using the 6 version but this may also be an issue with the 5 version.

With Internet Explorer, a clean cache in Drupal and IE, and going to the front page, nothing will load. IE immediately says there is a problem.

In the Apache error_log is this:

Call to undefined function base_path() in ...sites/all/modules/ubercart/uc_store/uc_store.module on line 468

Calling base_path() is/was apparently a problem with other Drupal modules and they replaced the function call with $GLOBALS['base_path'].

So, in uc_store.module, I replaced:

$_SESSION['uc_referer_uri'] = $protocol .'://'. $_SERVER['SERVER_NAME'] . base_path() . $_GET['q'];

with

$_SESSION['uc_referer_uri'] = $protocol .'://'. $_SERVER['SERVER_NAME'] . $GLOBALS['base_path'] . $_GET['q'];

and the problem seems to be solved.

Why this occurs only with IE (versions 6 and 7 at least) I have no idea.

CommentFileSizeAuthor
#4 uc_store-288821-4.patch571 bytesxurizaemon

Comments

sciman’s picture

Fixed in 8/11/08 version. Thank you.

ahkiam’s picture

I had the same error report running uc release 5.x-1.3 with Opera. Above fix made the error disappear. Thanks.

xurizaemon’s picture

Status: Needs review » Active

Oh, cool. We ended up with a different fix (just include_once('includes/common.inc'); before the base_path() call).

See http://www.ubercart.org/forum/bug_reports/6439/wsod_ie_failure_uc_store_...

You can also fix this problem by DISABLING YOUR CACHE in "Performance" settings. Of course, that slows down your site, but it's a quick fix.

We experienced this bug with Drupal 5.10 and Ubercart 1.3-rc1.

Also, for us, seemed IE-specific, but probably just due to different handling of the REFERER setting amongst various browsers.

There appear to be many sites affected by this bug: http://tinyurl.com/5hxwhq

xurizaemon’s picture

StatusFileSize
new571 bytes

This issue also affects 5.x-1.3 (the current download). A patch for that version of uc_store.module is attached.

xurizaemon’s picture

Status: Active » Needs review

Patch supplied for 5.x series above, but you should use sciman's fix in the comments for the 6.x series based on what he has said there.

Should I open a separate issue for the 5.x series? It's the same bug ... but a different patch.

Island Usurper’s picture

Status: Active » Fixed

I thought we'd actually fixed this already.

I much prefer the $GLOBALS['base_path'] solution because we don't need to load the entire common.inc file into memory. Not loading code we don't need is the whole point of caching pages, so we shouldn't undermine that.

I'll apply the fix to both 5.x and 6.x versions.

xurizaemon’s picture

Thanks Island - I supplied this version as I was uncertain whether the 5.x series matched 6.x with $GLOBALS['base_path'], but if so then I agree that $GLOBALS['base_path'] is the better approach and will update accordingly.

Cheers for the quick response

Anonymous’s picture

Status: Fixed » Closed (fixed)

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