All orders error out.

HTTP Result Code: 500
Debugging information follows.
Path: /system/ajax
StatusText: Service unavailable (with message)
ResponseText: Recoverable fatal error: Argument 1 passed to UcAddress::isSamePhysicalLocation() must be an instance of UcAddress, instance of stdClass given, called in [...]ubercart/shipping/uc_usps/uc_usps.module on line 674 and defined in UcAddress-> isSamePhysicalLocation() (line 75 of [...]ubercart/uc_store/classes/address.inc).

Comments

tr’s picture

Status: Active » Postponed (maintainer needs more info)

Did you upgrade from an earlier version of Ubercart? This doesn't happen on a clean install...

3goose’s picture

Status: Postponed (maintainer needs more info) » Active

Yes, this is a D7 upgrade from a D6 original. I did have several successful orders on the D7 version before this started happening.

tr’s picture

Does this happen only when you select one of the saved addresses in the delivery or billing panes?

What's in your uc_quote_store_default_address variable? (Look in the variable table in the DB or you can use drush variable-get uc_quote_store_default_address.) It's possible this didn't get updated to use the new UcAddress object, if so then going to admin/store/settings/quotes/settings and saving the default pickup address again.

tr’s picture

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

That doesn't seem to be it. My address was correct in the database and at admin/store/settings/quotes/settings.

I've only had two orders in the last week, but both failed. Here are screen shots one customer sent me, if that helps.

http://2pedal.com/error-1.png
http://2pedal.com/error-2.png

I don't know how to test it myself without buying stuff.

longwave’s picture

Did you actually click save on the address settings pages? It might show up correctly but be stored in an incompatible format in the database.

Also I'm curious as to how "Email ends up in Street Address line of billing address." can occur, I can't see why or how this would ever happen.

cybersimian’s picture

I can confirm that one of my installs also does this. It is a D7 clean install and the Ubercart install was not an upgrade.

Also I'm curious as to how "Email ends up in Street Address line of billing address." can occur, I can't see why or how this would ever happen.
Me neither but it does. Would be glad to supply more info if you tell me exactly what you need.

longwave’s picture

Do you have any Ubercart contrib modules enabled?

cybersimian’s picture

No contrib modules, just the standard install. I should mention that this install isn't erroring out every time but something is causing the an insertion of email into the street address field. Could it be browser specific? The install was tested before it went live and we also did a live test without errors. Seems strange that two different users should make the same mistake.

longwave’s picture

Perhaps it's the "autofill" feature of some browsers going wrong for some reason? I don't think you can control this from the server side, though.

3goose’s picture

It seems that fewer than half my orders fail this way. I just had a streak of good ones and now another failure.

Here's what seems to be common on all the failures:

Billing Name: Properly filled out
Billing Streed Address: contains email address
Billing City, State, Zip: empty
Shipping cost: empty

The customer said "I went through all the ordering steps on your website and into PayPal, but I found it curious I never received a confirmation email." So he was sent to paypal and thought he completed the order. He never received any sort of error message nor any confirmation.

The customer was using Safari for this order.

longwave’s picture

Which payment method(s) are you using? You say PayPal, but is that WPS, WPP, EC, or a combination?

3goose’s picture

I have both Paypal Express Checkout and PayPal Website Payments Standard enabled. Neither have any conditions.

3goose’s picture

I've now been asking the customers who contact me about failed orders, and they have been spread across firefox, safari, and ie.

The customer I spoke with this morning told me the order failed at the point where shipping was being calculated. This jives with the fact that none of the failed orders had a shipping line or shipping calculated.

longwave’s picture

What shipping method(s) are you using?

3goose’s picture

I'm still getting failed orders in several different ways.

is "shipping methods" the same as shipping quotes?
at /admin/store/settings/quotes this is what I have:
U.S. Postal Service (Envelope)
U.S. Postal Service (Parcel)
U.S. Postal Service (Intl., Envelope)
U.S. Postal Service (Intl., Parcel)

I just tried making an order myself, and when i checked the box to have my shipping address copy to my billing address, I got this error and couldn't continue:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /system/ajax
StatusText: Service unavailable (with message)
ResponseText: Recoverable fatal error: Argument 1
passed to UcAddress::isSamePhysicalLocation() must
be an instance of UcAddress, instance of stdClass
given, called in [...]
ubercart/shipping/uc_usps/uc_usps.module on line 674 and defined in
UcAddress->isSamePhysicalLocation() (line 75 of [...]
ubercart/uc_store/classes/address.inc).

I couldn't copy and paste from the window and had to type it. So if you see any odd typo there, it was probably my transcription and not in the original error.

tr’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Can't do anything with this without more information - answers to my questions in #3 to begin with.

interestingaftermath’s picture

Status: Closed (cannot reproduce) » Active

I'm also experiencing this issue. It happened 3x in a row for the same customer and worked the 3rd time. She reports that it was saying that it "timed out" but I can't confirm that.

TR, your question was answered in #5. I can also confirm that the address in the db shows correctly and I've resaved it on that page just to be sure. This is an upgrade from a D6 ubercart. Again, it's a sporadic issue at best. I was wondering if it was UPS's API that was having an issue but it's doubtful. Still digging and report back if I find anything else.

Has anyone fixed this?

EDIT:

I think re-saving the form has fixed this. The variable was saved as stdClass and now is saved as UcAddress. I didn't catch that the first time I checked the variable. Thanks for the tip that was better explained here: https://drupal.org/node/1350838#comment-5362864

interestingaftermath’s picture

Status: Active » Closed (cannot reproduce)