Beta1 Shipping Bug

Posts: 25
Joined: 01/11/2008

Hi,

I'm new to Ubercart and have just installed Beta1--correctly, I think. I'm looking for a solution to the problem discussed in THIS THREAD. Firstly, it would be helpful to have confirmation that this is a bug in Beta1 and not just a problem with my setup. Another user reports the same problem, which leads me to think it's a bug.

If a fix for Beta1 is possible within the next couple of days, then that'd be great. Otherwise, I'll have to look at retro-grading to Alpha8. Can anyone advise me on either an expected update for Beta1, or how to go about retro-grading?

Many thanks,
David

Posts: 931
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

After upgrading from Alpha 8, where all shipping rate quotes were working properly, I too found that I wasn't getting any USPS rate quotes.

I traced problem with USPS shipping quotes not returning any quotes to this piece of code (bazaar version 728 of uc_usps.module):

<?php
   
if ($service != 'data' || !in_array($service, $usps_services)){
      unset(
$services[$service]);
    }
?>

This condition will always evaluate to TRUE, since $service is never = 'data'. The result is that no rate quotes will be returned from the USPS module.

Changing the above lines to:

<?php
   
if (!in_array($service, $usps_services)){
      unset(
$services[$service]);
    }
?>

fixes the problem.

--

<tr>.

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

You'd think I'd understand logic by this point.

We still need the 'data' key because that's where the error messages go. Change the line to

<?php
   
if ($service != 'data' && !in_array($service, $usps_services)){
      unset(
$services[$service]);
    }
?>

and things will work better.

Posts: 25
Joined: 01/11/2008

Thank you both for your replies.

Neither of these amendments is working for me. It still comes up blank on the shipping quotes. Perhaps I have something else to change in my settings as well--but I was sure I'd done everything. I'm double-checking now; any suggestions are welcome!

[EDIT]

I wasn't expecting the solution to this problem to be in the USPS module, but rather the shipping module itself. Particularly considering the comment below from the other thread on this subject:

jezv wrote:
I have exactly the same issue, even with just flatrate delivery enabled. I've disabled all of the shipping related modules which does at least enable test transactions to be made, but I need to find a solution before the site can go live.

I also have the "Weight Quote" module enabled, and it's not showing anything either.

Posts: 146
Joined: 11/10/2007
Bug Finder

Oh.. the old and && or ||

--

Give and you will receive, you will be given much. Pressed Down, Shaken together, Running Over, it will spill into your lap.

Posts: 25
Joined: 01/11/2008

I may be onto a solution here, or maybe just a wild goose chase. I don't understand the code I'm looking at:

(from uc_shipping.module)
/**
* Implementation of hook_shipping_menu().
*/
function uc_shipping_menu($may_cache){

  $items = array();
 
  if (!$may_cache){
    if (is_numeric(arg(3))){

What is arg(3)? It doesn't return any value--other than ""--Nor does arg(5), both of which are found throughout this one function.

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

The uc_shipping module handles the code that "packages" and "ships" your products after the order has been paid for. uc_quote is the one that handles getting the shipping quotes during checkout from the various quote methods.

As for the arg() function, read through http://api.drupal.org/api/function/arg/5.

Posts: 25
Joined: 01/11/2008

Yup, arg() was a wild goose chase.

So, I downloaded the bleeding edge latest versions of all modules from Bazaar. I started by just uploading the shipping modules (including uc_quote) but that made no difference. I've now updated all ubercart modules, and still no joy.

Any ideas?

Posts: 25
Joined: 01/11/2008

I've uploaded the latest (rev.740) modules from Bazaar...
I've completely un-installed and re-installed all of the shipping modules...
I've checked over all the settings to make sure everything is set up...

But still nothing appears when I try to calculate shipping costs.

Is there any log info I can pass your way to pinpoint the problem?
Any more checklists I should step through?
Anything I can do???
Help!

Posts: 4
Joined: 01/15/2008

Yeah this feels like my situation also. Any ideas anyone?

Posts: 5367
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Just so you understand a little about that arg() bit... in hook_menu() functions, items in the !$may_cache block are evaluated every page load to generate possible menu items. arg() parses the URL to find values that might match the other if's in that block... if it's returning no results, then that menu item isn't being added.

Now, I doubt that's the problem for this specifically, but don't worry if some of those fail on various pageloads. It's supposed to happen and is the way for us to only make available certain functions on the pageload.

Do you have a test site you can point us to so we can see what's going on? That always helps. Eye-wink

Posts: 931
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

You could try using Firebug on the Checkout page to see if the AJAX calls are being made and what's being returned. You DO have JavaScript enabled, don't you? It would help if you said exactly what shipping module you're using and exactly how you set it up, so we could tell if you've missed a step. I suggest using just weightquote, since that's the simplest one. Make sure you have weights entered for your products. Turn all other quote methods off and uninstall them (not just deactivate!). Verify the weightquote configuration exists in workflow-ng - delete all configuration from other shipping quote methods that might not have been removed when you uninstalled those modules. Print statements can be inserted to verify that the weightquote module is being called and to see what is returned from the AJAX call. You can inspect your web server logs to see if the AJAX calls are being received. Apparently, the process is breaking down somewhere along the line, and you need to identify where the fault is. Since I know shipping quotes do work, I would expect there is a problem with your installation or with your web host configuration. At the risk of opening another can of worms, have you tried to apply a tax with the uc_tax module (http://www.ubercart.org/docs/user/315/tax_settings)? That also uses AJAX and workflow-ng.

--

<tr>.

Posts: 25
Joined: 01/11/2008

Firstly, yes JavaScript is enabled!

Here's a list of all related modules I have installed:

  • Token, uBrowser, Tables API
  • Cart, Order, Product, Store
  • Notify, Payment, Shipping Quotes, Reports, Shipping
  • U.S. Postal Service, Weight quote
  • PayPal
  • JQuery Update 5.x-1.0
  • Workflow-ng.*
  • I believe I've provided all information for each of the modules, including a default store address, product weight, and USPS user ID.

    I've got Firebug installed, but am not quite sure which of its many panels of information I should be looking at, nor what I should look for. Here's what shows up under "Console: Post"

    details[city] Pasadena
    details[company]
    details[country] 840
    details[first_name] David
    details[last_name] Barlia
    details[phone]
    details[postal_code] 91101
    details[street1] 380 Parke Street
    details[street2] Unit 8
    details[zone] 12
    products 6%5ETesting%5E98709870987%5E%5E2%5E0.00%5E1.37%5E0.125%5Ea%3A2%3A%7Bs%3A6%3A%22module%22%3Bs%3A10%3A%22uc_product%22%3Bs%3A9%3A%22shippable%22%3Bs%3A1%3A%221%22%3B%7D
    uid 1

    And the "Console: Response..."
    [  ]

    This error comes up when I first go to the checkout page:
    [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIFileOutputStream.init]"
    nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"
    location: "JS frame :: file: //C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js :: sss_writeFile :: line 2055"
    data: no]
    file: ///C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js
    Line 2055

Posts: 25
Joined: 01/11/2008

...feel free to visit the site to test out placing an order yourself:
http://quitnicotinenow.net

And thank you for your help!

Posts: 146
Joined: 11/10/2007
Bug Finder

Tried it and got just a blank box with no shipping... Sure would like to quit smoking though

--

Give and you will receive, you will be given much. Pressed Down, Shaken together, Running Over, it will spill into your lap.

Posts: 60
Joined: 11/27/2007

This may, or may not, send you in the right direction. Anytime you install a new shipping quote option, you need to go to workflow_ng page. When there, edit any active shipping rules, click on the checkbox to disable it and save your changed configuration. Your rule will appear in the inactive list. Click on the reset beside this to restore it. Now it will work.

For some shipping quote methods, there may still be errors. But usually something will appear.

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

I guess this means that the workflow cache needs to be cleared whenever there's a change in the shipping quotes. I hate that there are two different places to enable and disable these things. The variable uc_quote_enabled is just too convenient to get rid of, but there's got to be a way to bind the two pieces together.

Posts: 4
Joined: 01/15/2008

We got ours working (shipping via weight method) by:

1.) updating our site's entire Drupal Core
2.) Re-Installing Ubercart and associated modules all at their most recent version.
3.) Enabling all shipping methods - then switching off the ones that weren't needed.

There's definitely something wrong, some conflict somewhere, as this kind of backtracking shouldn't be necessary. We had a stage site, so it could all be done relatively safely, even if it did waste a day or 2.

Posts: 25
Joined: 01/11/2008

I've just tried seedseller's tip, with no change. (Thank you, nonetheless!)

If there's no other ideas to try, then I guess I'll give luke_g's reinstallation a shot.

Posts: 1314
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Just as an FYI (not sure if this is related to anyone else's issues), after updating to the most recent bazaar, I had to select the USPS shipping methods again. They had been turned ON before the update; after the update, I had to revert the Workflow_ng configurations to their defaults as well as re-activate the USPS shipping methods. Oddly enough, my USPS webtools API number / username was still intact, as were all of my shipping method preferences (First Class Parcel, etc.). Weird.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 25
Joined: 01/11/2008

Okay, I've had it. I've uninstalled, re-installed (beta 2), configured, re-configured, tested and re-tested. Ubercart is simply not working!

In the process of trying to get this thing working, I've seen a *lot* of inscrutable warning messages, such as these...

user warning: Table 'barliesq_nicotinedrupal.variables' doesn't exist query: DELETE FROM variables WHERE name LIKE 'uc_notify_%' in /home/barliesq/public_html/_quitnicotinenow/includes/database.mysql.inc on line 172.

user warning: Table 'uc_store_footers' already exists query: CREATE TABLE uc_store_footers ( `path_hash` varchar(32) NOT NULL default '', `message` text NOT NULL, PRIMARY KEY (path_hash) ) /*!40100 DEFAULT CHARACTER SET UTF8 COLLATE utf8_unicode_ci */ in /home/barliesq/public_html/_quitnicotinenow/includes/database.mysql.inc on line 172.

warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, '_content_admin_field_add_existing' was given in /home/barliesq/public_html/_quitnicotinenow/includes/form.inc on line 218.

warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, 'uc_product_add_to_cart_form_5' was given in /home/barliesq/public_html/_quitnicotinenow/includes/form.inc on line 218.

This is really a bad sign. Well, I suppose Ubercart has only just gone Beta after all. But somehow I was expecting better. There's way too much going wrong here with no user friendly feedback explaining where there may have been installation mistakes. If Ubercart doesn't handle errors in a user-friendly manner, then how is it ever going to be considered production ready?

I'd like to offer useful beta testing feedback, but I've lost a lot of time here. If nobody has any ideas what I can do to make Ubercart function properly, then I have no alternative but to junk it and try eCommerce.

Posts: 1314
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Well it looks like your installation of Drupal had some issues. For some reason the "variables" table doesn't exist. Did you delete it on accident? The first error looks like it's because the variables table isn't there, so it can't delete the rows that start with "uc_notify".

The second error shows that the uc_store_footers table ALREADY exists - so you are trying to create a table, but can't since it's "already" there - the error in this case wouldn't affect normal cart operation (it'd be a one-time thing that you could ignore).

The last errors appear to be getting thrown because the arguments are invalid, but are most likely the result of the other errors (or other errors not listed here).

My advice: delete your databases, reinstall Drupal, then reinstall Ubercart and the modules it REQUIRES - Tapir, Workflow_ng, etc. Make sure you install those first and then save changes; don't go and install all modules all at the same time.

Then install the optional modules such as Imagecache / Imagefield, CCK, Thickbox, etc. Make sure you aren't getting any database errors on any of these.

Then configure your cart. Make sure you setup the important stuff - your origin address, your shipping APIs (if applicable), credit card modules and info, all that stuff.

Basically, follow these instructions to a T: http://www.ubercart.org/docs/user/802/new_drupal_installation

Sorry for being verbose about this. I've installed Drupal and Ubercart 3 separate times on two boxes, and upgraded core Drupal, core Ubercart and other misc modules on my Apache / Linux box with no issues whatsoever. The fact that you are having problems with the setup is an issue to be taken seriously, but we have to rule out any extraneous mistakes during installation or other unknowns before we can really determine what is going wrong.

Good luck and let us know how the reinstallation goes. Remember, I don't mean just reinstall Ubercart; if at all possible, remove all the files from your webroot / public html folder and reinstall from scratch. Sometimes it's necessary in a case like this and I think it'll be worth it. If you can't go that far, there are other ways, including backing up the database and unpacking the tarball, resubmitting your settings.php file, etc.

Good luck!

EDITED for beautification of code Smiling

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 25
Joined: 01/11/2008

Firstly, thank you for taking the time. Verbose assistance is nothing to apologize for. Smiling

I have to say that I am not at all eager to wipe out my whole Drupal installation with all of its modules, configurations and content just to make Ubercart work properly. This installation was made from the latest Drupal core, and ran perfectly until I started wrangling with Ubercart. It shouldn't be necessary to reinstall Drupal, unless Ubercart has damaged the database. If it comes to that, then I'm willing to give this one last shot.

torgosPizza wrote:
For some reason the "variables" table doesn't exist. Did you delete it on accident? The first error looks like it's because the variables table isn't there, so it can't delete the rows that start with "uc_notify".

I should have made it more clear that the various warnings I listed do not continue to come up---they simply came up as I was going through the process of completely removing Ubercart to reinstall it. I did try to delete anything that looked like an Ubercart variable before reinstalling.

The variables table is fine. There are no entries beginning "uc_notify_" in it now, but then I haven't re-installed the Notify module. That message came up while I was uninstalling Ubercart, but before I manually deleted anything from the variables table. I would say there is a problem with any module if it is unable to uninstall itself without producing warning messages. That goes for both the Notify and Store modules.

The last warning messages came up on a product page that I never deleted when I removed Ubercart. I have since deleted that product page and re-created without those messages coming up.

So all in all, what I'm seeing is a lot of mess left behind by the previous Ubercart installation that screwed up the new installation. I would much rather be able to uninstall Ubercart completely... and cleanly! Shouldn't I be able to do that?

Posts: 25
Joined: 01/11/2008

Okay, so I've given in I've reinstalled Drupal (5.6) from scratch. I've just uploaded the four required Drupal modules. I activate just these four, and...

Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/workflow_ng/workflow_ng/workflow_ng.module on line 625

[EDIT]
Updated to the latest version of workflow_ng and got past this step okay.
Please note: the version I uploaded at first came from the Ubercart Package installation (which I did NOT use to install Drupal 5.6!)

Posts: 5367
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

As you might imagine, uninstalls aren't something we get to test a whole lot. However, as you've been posting issues, they've been getting fixed in the code. You ought to use the latest versions available on clean installs, and while we'll put a beta 3 out in the near future, to avoid some difficulties you can try the download at http://bazaar.ubercart.org.

Perhaps the workflow-ng thing was causing the difficulties before w/ shipping? Who knows.. Puzzled Sorry you've had such a rough go, but thanks for keeping us informed throughout the process. (And regarding those uninstall error messages, there's no way for us to trap every bad query and return a user friendly warning. Best thing to do is just post it up if you're worried about it and let us fix it in the code if need be. You can usually tell which module is giving you grief by looking at the table name.)

Posts: 1314
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

barliesque wrote:
Okay, so I've given in I've reinstalled Drupal (5.6) from scratch. I've just uploaded the four required Drupal modules. I activate just these four, and...

Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/workflow_ng/workflow_ng/workflow_ng.module on line 625

[EDIT]
Updated to the latest version of workflow_ng and got past this step okay.
Please note: the version I uploaded at first came from the Ubercart Package installation (which I did NOT use to install Drupal 5.6!)

Strange that you mention the Uberinstaller, I think that's usually pretty well kept up. Would be interesting to see if the issues go away with an install from the latest Bazaar SVN update.

Also, about the pass-by-reference error (at least that's what it looks like). Maybe upgrading Wf_ng is the issue solver here. What version of PHP are you using, out of curiousity?

Can you attempt to re-enable all of your modules for the cart setup and let us know if you still have the original shipping issue? And of course note any errors you encounter in the process.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 25
Joined: 01/11/2008

I've got a complete installation again now: Drupal 5.6 (where previously I'd had Drupal 5.5) and Ubercart Beta 2. Workflow_ng (5.x-2.x-dev) and Workflow_ng UI are installed---State Machine API and COntent Links aren't needed by Ubercart, right? By the way it would be *GREAT* if Bazaar subversion numbers appeared in dev release version descriptions---then I could tell you *EXACTLY* which version I had installed.

I have a new kind of error when requesting a shipping quote, which I think is a distinct improvement since it shows some actual communication is taking place with the Post Office:

<Error>
<Number>80040b1a</Number>
<Description>Authorization failure.  You are not authorized to connect to this server.</Description>
<Source>UspsCom::DoAuth</Source>
</Error>

So, I bet I'm going to have to phone up the Post Office to beg them to let my site talk to their web tools. How bout I do that right now?

p.s. My server is using PHP 4.4.4

Posts: 25
Joined: 01/11/2008

Okay, now I may just be losing my mind. I spoke to the Post Office Tech Support people and they've activated my UserID. Now I was sure there was also a Username and Password that have to go in somewhere for USPS shipping quotes. I can't find it anymore! Couldn't all three of these have been in the same place?

I sense I'm almost there... almost there... regulating breathing... relaxing... almost there...

Posts: 1314
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Yep- admin/store/settings/quotes/methods/usps

You don't need a password, just your API username.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 25
Joined: 01/11/2008

As I suspected. I was in fact losing my mind. I just had the wrong User ID. For the most part it now works! Smiling Yippeee!

...However, there is another problem. After calculating shipping quotes (from either the cart view or the checkout) whatever page I navigate to next comes up with this:

    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _characterData() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _characterData() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _characterData() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _characterData() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _characterData() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _characterData() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _characterData() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _characterData() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _characterData() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _characterData() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _characterData() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _startElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _characterData() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.
    * warning: xml_parse() [function.xml-parse]: Unable to call handler _endElement() in /home/barliesq/public_html/_quitnicotinenow/sites/all/modules/ubercart/uc_store/includes/simplexml.php on line 244.

Sorry to post ALL of that. Jawdropping!

...Uh-oh. I've run into more trouble. Testing in IE (rather than Firefox) just now, I placed an order in my cart, tried to calculate shipping quotes (based only on a zipcode, of course) and it sat there waiting for quotes that never came. I clicked on Checkout, and the following errors came up:

warning: Invalid argument supplied for foreach() in /home/barliesq/public_html/_quitnicotinenow/modules/node/node.module on line 521.
warning: implode() [function.implode]: Bad arguments. in /home/barliesq/public_html/_quitnicotinenow/modules/node/node.module on line 525.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/barliesq/public_html/_quitnicotinenow/includes/database.mysql.inc on line 172.

I clicked again on View Cart; didn't bother to get shipping quotes; clicked Checkout again, and no error messages came up this time. Sad

Give it a try: http://quitnicotinenow.net

Posts: 931
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

The XML errors are almost certainly due to your PHP version being so old. XML handling is not built into PHP 4, so Ubercart shipping quotes uses a library called JSimpleXML to parse the XML returns from the USPS server. JSimpleXML is designed to run on PHP 4.2.0 and above, but a vast amount of evidence in these forums indicates that threshold is not correct, since it does not work properly even with with higher versions of PHP 4. It is not clear what the minimum needed PHP version is, or whether any PHP 4 version will work properly.

I strongly suggest you upgrade to PHP 5.

If your web host provider insisted on selling you a hosting package using an operating system which hadn't even been patched in the past 4 years, running on 4 year old hardware, you'd laugh and go someplace else.

The situation is no different with PHP. PHP 5 had its first official release almost 4 YEARS ago, and PHP 4 just had its LAST official release, with an announced end-of-life in August 2008 - it will no longer be supported after that. If your web host provider doesn't favor PHP5 over PHP4 and won't upgrade you, it's time to dump them.

--

<tr>.

Posts: 1314
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

If you want to give me Admin access I can take a brief look for you. There is probably some good information in your logs - go to /admin/logs/watchdog and take a look.

I think some of it may be the version of PHP you are using. Any chance you can ask your provider to upgrade you to PHP5?

EDIT: TR, you beat me to it Smiling

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

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

Also, make sure the settings point to the Production server, rather than Testing. The software on those two machines is completely different, despite all documentation saying otherwise. To me, those error messages look like what happens when you try to parse HTML as XML. Doesn't work too well.

Posts: 25
Joined: 01/11/2008

Smiling

Thank you all for your replies. As it turned out, going to PHP 5 was all it took. I love my host, by the way: Site5. They've been running PHP 4 and 5 in parallel for a while--soon to convert over to all PHP 5. All I needed was a directive in my .htaccess file... Come to think of it, I'm glad this issue came up, since I'll be wanting to use PHP 5's XML features on a project coming up.

I've just carried an order all the way through to PayPal successfully. However, one more minor issue has come up. On the "Review Order" screen, the message "You must select a shipping option before continuing" was at the top of the screen--in spite of my having already selected a shipping option which was calculated into the order just fine.

Posts: 25
Joined: 01/11/2008

Ah! Special note: The problem I reported above with Internet Explorer still happens... except that what I was testing with was really IE Tab (Firefox plugin that uses IE to render the page). For most pages IE Tab is fine, but once in a while it has a problem that IE itself does not. This is one of those cases--It works just fine in Internet Explorer. Eye-wink

Posts: 25
Joined: 01/11/2008

Lyle wrote:
Also, make sure the settings point to the Production server, rather than Testing. The software on those two machines is completely different, despite all documentation saying otherwise. To me, those error messages look like what happens when you try to parse HTML as XML. Doesn't work too well.

Where do I find this setting? I just got an automated message from USPS that says...

Congratulations on completing your testing of the United States Postal Service® Internet Shipping Application Program Interfaces (APIs). Your profile has been updated to allow you access to the Production Server.

1. The Production Server URL is: production.shippingapis.com.
2. There is a line of code that refers to "shippingapitest.dll". You'll need to remove the word "test".

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

Ah, I forgot. That setting was taken out because the test server never did work. There was no reason to point to it. I guess it really was PHP not doing the XML thing right.

Posts: 25
Joined: 01/11/2008

Ah okay, so the Post Office's message wasn't really responding to anything my website is doing. Naturally.

I posted so many times above, the one remaining minor issue got a little buried. In case you missed it...

I wrote:
I've just carried an order all the way through to PayPal successfully. However, one more minor issue has come up. On the "Review Order" screen, the message "You must select a shipping option before continuing" was at the top of the screen--in spite of my having already selected a shipping option which was calculated into the order just fine.

Posts: 33
Joined: 02/25/2008

Got my USPS ID, de-activated and reset my workflow_ng where appropriate and I'm still getting this error when I try to calculate shipping:

80040b1a
Authorization failure. You are not authorized to connect to this server.
UspsCom::DoAuth

running drupal 5.7+ and php5

Posts: 931
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

The production server uses different credentials than the test server. The numbers they send you initially are only for the test server - you have to contact them and get them to switch you to the production server. See http://www.ubercart.org/docs/user/312/usps_web_tool_shipping_quote_setti...

--

<tr>.

Posts: 7
Joined: 12/22/2007

I'm experiencing a similar problem trying to calculate shipping. Here is my error:

<Error>
<Number>80040b1a</Number>
<Description>Authorization failure.  Perhaps username and/or password is incorrect.</Description>
<Source>UspsCom::DoAuth</Source>
</Error>

I have my ID with usps.com entered correctly in admin/store/settings/quotes/methods/usps and I verified I can sign in with it on usps.com.

I also went into workflow and deactivated and then reactivated the USPS shipping rule. Is there anything else I can try or anything I'm doing wrong?

Posts: 931
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

Please read http://www.ubercart.org/docs/user/312/usps_web_tool_shipping_quote_setti... carefully. Your Web Services ID can NOT be used to log into usps.com. "Authorization failure" means you're not using valid credentials.

--

<tr>.

Posts: 7
Joined: 12/22/2007

TR wrote:
Please read http://www.ubercart.org/docs/user/312/usps_web_tool_shipping_quote_setti... carefully. Your Web Services ID can NOT be used to log into usps.com. "Authorization failure" means you're not using valid credentials.

Okay, I feel silly! I just signed up for my Web Services ID. Many apologies for not reading the documentation carefully!