Call to undefined function arg() in cart module when user is anonomous and site caching is on

pbuonaiuto - April 25, 2009 - 16:46
Project:e-Commerce
Version:5.x-3.6
Component:ec_cart
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs review
Description

The following error is generated if the user is 'anonymous' and site caching is set to 'normal':

Fatal error: Call to undefined function arg() in /sites/all/modules/ecommerce/cart/cart.module on line 117

Although most browsers seem to get past the error and produce reasonable results, IE6 and IE7 simply truncate HTML and therefore exhibit significant rendering issues. I tested other browsers (FF2, FF3, Safari, Chrome, Konquerer) and they seem to render the page well.

There is no error after logging in.

If I set caching to 'none', there is no error, even when logged out.

It seems as if the Drupal bootstrap process skips a step for anonymous users when the site is cached and so path.inc isn't loaded when arg() is called.

#1

crozilla - August 25, 2009 - 06:24

I'm getting the same caching error doing the same thing. Noticed it first on Chromium/Ubuntu. Looking for a fix, too.

#2

neclimdul - September 1, 2009 - 18:04
Status:active» needs review

Gah, very annoying indeed. Breaks rss.xml. Patch.

AttachmentSize
cart_fatal_error.patch 618 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.