When starting the Checkout process I am getting this error:

PHP Fatal error:  Call to a member function value() on a non-object in /Users/charlton/WORK/example.com/sites/all/modules/contrib/commerce/modules/customer/commerce_customer.module on line 119

I am testing a new site that is in development and have a lot of Commerce plug-ins installed (most, if not all are sanctioned on the Commerce Guys web site).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rszrama’s picture

Category: bug » support
Priority: Major » Normal

Nothing I've ever experienced in core before, and I don't see any reason why commerce_customer_profile_default_label() would get called without a fully loaded customer profile. I suspect one of the contributed modules you have, but to figure it out you're going to probably need to disable them one by one and see when the error goes away. When you get there, we can move this issue to the appropriate queue as a bug report or something.

rszrama’s picture

On a side note, do you guys ever use a ride sharing service for people traveling to DrupalCamp LA? There's a startup in a local accelerator called Ridepost that's trying to facilitate ride sharing starting with college students (obviously) but also events, and I'd love to see if they could help us solve ride sharing for DrupalCamps / Cons as opposed to general forums. Lemme know if you might be interested and I can get them to get in touch. : )

rszrama’s picture

Status: Active » Postponed (maintainer needs more info)
Chris Charlton’s picture

I've figured out the problem...

Problem: When a Customer Profile Type (Billing or Shipping) field `allowed values` is set to anything other than 1, the Checkout Review page gets a blank white screen (and the PHP error mentioned above appears in my error_log).

Current Solution: I have tried values "Unlimited" and "10", both result with a white screen of death. When I change the value back to 1 the review page seems to load properly.

I am interested in offering a customer multiple Billing/Shipping address profiles, and thought it'd be possible with the method I have tried so far, but if there's a "better" way then please advise.

Chris Charlton’s picture

Status: Postponed (maintainer needs more info) » Active
vasike’s picture

Status: Active » Needs review
FileSize
986 bytes

i can confirm this error when the Address field from Customer profile is set as multiple values field.
here is a patch to avoid the WSOD, but i don't think this is a solution.

@Chris Charlton : i'm not sure what are you trying to accomplish.
But, about the customer profiles i can assure you that a Customer (Drupal user) can have multiple Profiles, and every profile has only 1 address. Not a profile with multiple addresses.
So Maybe the confusion is just the "Profile" naming convention.

Here are some resources about Customer profiles
http://www.drupalcommerce.org/user-guide/customer-profiles
http://commerceguys.com/blog/commerce-module-tuesday-commerce-addressbook
http://commerceguys.com/blog/commerce-module-tuesday-commerce-extra

So, imho, the issue here it's about having Multiple address field support for Customer profiles (i can't see why) or NOT.

rszrama’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Status: Needs review » Fixed

Committed the patch, as it's worth fixing, but I'm agreed with vasike that this probably isn't the best configuration for what you want.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Replaced domain with example.com.