ups xml_parse error alpha 8

Posts: 168
Joined: 10/08/2007
Bug FinderGetting busy with the Ubercode.PayPal Hero

I get the following error (debug) a bunch of times doing a ups rate quote:

warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/xxx/public_html/sites/default/modules/ubercart/uc_store/includes/simplexml.php on line 244.

Alpha 8 code, ups is only one enabled. It does give me ups ground as an option, but that's it. I saw a post about usps about this. Any fix for ups?

--

Christopher Schaub
LuteGrass, LLC
http://www.lutegrass.com

Posts: 2267
Joined: 08/07/2007
AdministratoreLiTe!

Somehow, the response after UPS ground wasn't XML like it expected. Is there any indication in the debug or Firebug about what kind of information was returned?

Posts: 168
Joined: 10/08/2007
Bug FinderGetting busy with the Ubercode.PayPal Hero

Hi. I've noticed the response in firebug is ...

{ "ups---01": [  ], "ups---03": { "rate": "7.66", "format": "$7.66", "option_label": "\x3cimg class=

\"ups_logo\" src=\"/sites/default/modules/ubercart/shipping/uc_ups/uc_ups_logo.gif\" /\x3e UPS Ground

Rate" } }

I'm asking it for Ups Ground and Ups Next Day Air. The ground is returning something but the air is not. Hmmm, is this just a problem with an internal error that shouldn't be printing if an item returns no value in my ship-from zone?

Also, I've tried setting the packaging type in the product to "Small Package" -- but it won't let me, it says my dimensions are empty when they're not. I have all three with values. So, I have to use "Store Default". Unless I use some other packaging type than "Customer Supplied Packaging" -- it doesn't throw the error if I use flat-rate box or a different type.

Thanks for any insight. Do you think I could upgrade just the "uc_ups" directory in shipping from alpha8 to bazaar without too much chaos? The code changes seem pretty isolated to the ups module? I'm just trying to avoid an entire swing to bazaar at this point, trying to golive in a week and ups is the last piece.

Thanks for any help.

--

Christopher Schaub
LuteGrass, LLC
http://www.lutegrass.com

Posts: 168
Joined: 10/08/2007
Bug FinderGetting busy with the Ubercode.PayPal Hero

Ok, I've updated to the bazaar version of shipping. Resaved everything and cleared cache. Still the same issue. It seems to be getting freaked out because it's only getting back Ups Ground, one item. The rest are null returns from ups. I'm using the testing system here. The only thing I haven't tried is php5, and that's a radical move at this point, have to retest everything. So, any feedback is super appreciated. You can see in my other post on this thread that UPS Ground is the only return with valid data.

--

Christopher Schaub
LuteGrass, LLC
http://www.lutegrass.com

Posts: 168
Joined: 10/08/2007
Bug FinderGetting busy with the Ubercode.PayPal Hero

Ok, looking even more closely, I see that multiple rate values ARE being returned by ups. UPS is returning UPS Ground and Next Day Air. Both are getting back well formed xml (according to tidy) and seem to have the same basic elements. So why all of the php xml_parse errors? Also, only UPS Ground shows up on the screen with a price -- even though both are coming back in the xml?

ups is only shipping method
php4.4.4
alpha 08 (shipping dir at bazaar)

--

Christopher Schaub
LuteGrass, LLC
http://www.lutegrass.com

Posts: 2267
Joined: 08/07/2007
AdministratoreLiTe!

Could you post the Next Day Air response, please, or send it to me in a PM? There might be some corner case that the JSimpleXML class doesn't handle right, but don't know what it might be. Be sure to remove any private information before you do.

Posts: 168
Joined: 10/08/2007
Bug FinderGetting busy with the Ubercode.PayPal Hero

Ok, I'll try. We moved to php5 which might make it tough. I'll try to setup a mamp php 4.4.4 to get you the debug. Thanks.

--

Christopher Schaub
LuteGrass, LLC
http://www.lutegrass.com

Posts: 13
Joined: 11/09/2007

I am also seeing the php xml_parse errors, along with the Calculate Shipping error, "There were problems getting a shipping quote..." Most of all, I am having problems receiving multiple UPS service quotes.

When I have the Shipping Quote Settings for UPS set to get quotes for more than one UPS service, I get varied responses depending on the combination of services I have set. (With the main problem as stated above, I cannot seem to receive back multiple valid service responses that would then allow a customer to select a service to be added to their cart.)

When I test each service independently, I get a response with a price for each test and discovered one case for which the service is not actually available. In that one case, I get the following response instead of a price, "Hard 111100: The requested service is invalid from the selected origin." (This was for ups---11, UPS Standard)

Then, when I test the failing (ups---11, UPS Standard) service in conjunction with one of the other valid services, I no longer get the price for the valid service and only receive the Calculate Shipping error message, "There were problems getting a shipping quote. Please..."

Oddly enough, only in the case of requesting both UPS Ground (which is a valid service) and ups---11, UPS Standard, I do get back the UPS Ground price AND the Calculate Shipping error message.

All other tests done in conjuction with the failing service come back with only the Calculate Shipping error.

Laslty, when I test using only two valid services, I get only one of the quotes back and then the Calculate Shipping error.

So, does this indicate that the module is unable to recieve multiple quotes or, is there something that I am doing incorectly with my settings?, ect.

Very much looking forward to getting some help and would be happy to provide as much info as needed along the way.

Thanks in advance - KIM Smiling

uc_ups.module (10-2-07), (in Production Mode)
Drupal 5.3
Ubercart alpha7e
PHP 4.4.7

Posts: 168
Joined: 10/08/2007
Bug FinderGetting busy with the Ubercode.PayPal Hero

If you need it fixed fast, try php5. Sometimes this is as easy as a 1 line addition to your .htaccess file, depending on your hosting company.

--

Christopher Schaub
LuteGrass, LLC
http://www.lutegrass.com

Posts: 2267
Joined: 08/07/2007
AdministratoreLiTe!

Even with alpha7e, it should work for multiple service types. If it turns out that upgrading to PHP 5 doesn't fix it, try getting Workflow-ng and Übercart alpha 8. The shipping quotes were redone in such a way that might make it more useful for you.

Posts: 13
Joined: 11/09/2007

Very much need help - I feel at this point, I must be missing something simple.

I have since upgraded my PHP from 4.4.7 to PHP 5. (MySQL, unchaged, 5.0.45)
I have completely uninstalled my Drupal/Ubercart and deleted the database.
I did a fresh install of both to the latest versions, Drupal 5.5/Ubercart Alpha 8.

Prior using PHP 4.4.7, Drupal 5.3, and Ubercart Alpha7e, I had been getting some quotes some of the time depending on the combination. (see above beginning with, "I am also seeing the php xml_parse errors")

Now, I only see in both Firebug, and onscreen as the Admin the following:

<?xml version="1.0" encoding="UTF-8"?>
<AccessRequest xml:lang="en-US">
  <AccessLicenseNumber>1C19CA0A0B3DA118</AccessLicenseNumber>
  <UserId>mmwebdev</UserId>
  <Password>maxedmedia</Password>
</AccessRequest>

<?xml version="1.0" encoding="UTF-8"?>
<RatingServiceSelectionRequest xml:lang="en-US">
  <Request>
    <TransactionReference>
      <CustomerContext>Complex Rate Request</CustomerContext>
      <XpciVersion>1.0001</XpciVersion>
    </TransactionReference>
    <RequestAction>Rate</RequestAction>
    <RequestOption>rate</RequestOption>
  </Request>
  <PickupType>
    <Code>01</Code>
  </PickupType>
  <CustomerClassification>
    <Code>04</Code>
  </CustomerClassification>
  <Shipment>
    <Shipper>
      <ShipperNumber>647R26</ShipperNumber>
      <Address>
        <City>Wayne</City>
        <StateProvinceCode>PA</StateProvinceCode>
        <PostalCode>19087</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </Shipper>
    <ShipTo>
      <Address>
        <StateProvinceCode>PA</StateProvinceCode>
        <PostalCode>19040</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </ShipTo>
    <ShipFrom>
      <Address>
        <StateProvinceCode>PA</StateProvinceCode>
        <PostalCode>19087</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </ShipFrom>
    <ShipmentWeight>
      <UnitOfMeasurement>
        <Code>LBS</Code>
      </UnitOfMeasurement>
      <Weight>1.5</Weight>
    </ShipmentWeight>
    <Service>
      <Code>03</Code>
      <Description>UPS Ground</Description>
    </Service>
    <Package><PackagingType><Code>02</Code></PackagingType><PackageWeight><UnitOfMeasurement><Code>LBS</Code><Description>Pounds</Description></UnitOfMeasurement><Weight>1.5</Weight></PackageWeight><PackageServiceOptions><InsuredValue><CurrencyCode>USD</CurrencyCode><MonetaryValue>15</MonetaryValue></InsuredValue></PackageServiceOptions></Package></Shipment>
</RatingServiceSelectionRequest>

Which looks to me not like an error but rahter just the Request?
What could I possibly be missing in order to get UPS quotes working?

Please advise - Thanks in advance,
KIM Smiling

Posts: 2267
Joined: 08/07/2007
AdministratoreLiTe!

At this point, I think you have to look at your error logs for PHP. Start at the watchdog table, and if that doesn't help, locate the Apache error log for PHP. Because you're getting to the part where the request is constructed, I can tell that a lot of stuff is working correctly. But since you're not getting anything at all back from UPS, it's harder to say what's going wrong.

Posts: 13
Joined: 11/09/2007

Thanks for the response - I am not seeing any errors in Watchdog (had been seeing XML parse errors but no longer since I think I upgraded to Alpha8 on PHP5 but, I am getting confused now as to when I got what errors Smiling
Anyway, I took a look into the Apache logs via CPanel and do not see any php errors in my logs so, I may end up shooting over a support question to my awesome host LiquidWeb if I still cannot figure out either where else the PHP errors would be shown, or confirm that there are none to find.

Correct, it does appear that the Request is good but yes, without any feedback it is impossible to begin determining the point of failure. I will continue and will get back here with what I find, etc.

Thanks!
KIM Smiling

Posts: 33
Joined: 10/26/2007

@Lyle, I think this is a PHP4 vs PHP5 problem. I am thinking the code from simplexml.php is not php4 friendly. I was working on a client site on my PC (LAMP with PHP5) and all worked well. I transferred the files and database and suddenly this same error message came up on the cart and checkout pages.

I am using UCa8 at this point, I would like to "hide" these errors for the time being until a permanent fix is in place OR until the client gets his host to do php5.

Any ideas?

--

===
Elvis McNeely
Blogging about Drupal: http://www.elvisblogs.org/drupal

Posts: 33
Joined: 10/26/2007

I am embarrassed I forgot how to turn these errors off Sad

To turn the errors off just disable the "error reporting" in admin/settings/error-reporting

Cheers

--

===
Elvis McNeely
Blogging about Drupal: http://www.elvisblogs.org/drupal

Posts: 2267
Joined: 08/07/2007
AdministratoreLiTe!

If there's ever going to be any leverage to get web hosts to switch to PHP 5, XML will be it. The simplexml.php file is supposed to be Joomla's port of the SimpleXML module to PHP 4. But I don't have PHP 4, so I never could test it very well.

Posts: 91
Joined: 11/06/2007
Bug FinderGetting busy with the Ubercode.

I get the same "Hard 111100: The requested service is invalid from the selected origin" error. The following is the response from quote via firebug:
{
"ups---11": { "error": [ "Hard 111100: The requested service is invalid from the selected origin."] },
"ups---03": { "rate": 7.2, "format": "$7.20", "option_label": "\x3cimg class=\"ups_logo\" src=\"/sites/default/modules/ubercart/shipping/uc_ups/uc_ups_logo.gif\" /\x3e UPS Ground Rate" },
"ups---12": { "rate": 11.08, "format": "$11.08", "option_label": "\x3cimg class=\"ups_logo\" src=\"/sites/default/modules/ubercart/shipping/uc_ups/uc_ups_logo.gif\" /\x3e UPS 3-Day Select Rate" },
"ups---02": { "rate": 15.88, "format": "$15.88", "option_label": "\x3cimg class=\"ups_logo\" src=\"/sites/default/modules/ubercart/shipping/uc_ups/uc_ups_logo.gif\" /\x3e UPS 2nd Day Air Rate"},
"ups---59": {"rate": 18.49, "format": "$18.49", "option_label": "\x3cimg class=\"ups_logo\" src=\"/sites/default/modules/ubercart/shipping/uc_ups/uc_ups_logo.gif\" /\x3e UPS 2nd Day Air A.M. Rate" },
"ups---13": {"rate": 37.09, "format": "$37.09", "option_label": "\x3cimg class=\"ups_logo\" src=\"/sites/default/modules/ubercart/shipping/uc_ups/uc_ups_logo.gif\" /\x3e UPS Next Day Air Saver Rate" },
"ups---01": {"rate": 40.65, "format": "$40.65", "option_label": "\x3cimg class=\"ups_logo\" src=\"/sites/default/modules/ubercart/shipping/uc_ups/uc_ups_logo.gif\" /\x3e UPS Next Day Air Rate" },
"ups---14": {"rate": 74.42, "format": "$74.42", "option_label": "\x3cimg class=\"ups_logo\" src=\"/sites/default/modules/ubercart/shipping/uc_ups/uc_ups_logo.gif\" /\x3e UPS Next Day Early A.M. Rate" },
"usps---data": { "error": "Please enter the package weight.\x3cbr /\x3e" }
}

Posts: 1
Joined: 04/17/2008

basically i want UPS web service which work on international level..
the code needed in asp.net 2.0

hi .. in UPS web service when i post 6 digit zip code or like any character than it is not accepted by UPS web service app. version 1.2 it gives error like " UPS only accept 5 digit zip code"

so u have any idea about UPS web service which works on all zip codes..? i want code in ASP.NET . so if u have than please send me..