I installed the new module 6.x-1.1 and I am get the following response when requesting any shipping quote:

There were problems getting a shipping quote. Please verify the delivery and product information and try again. If this does not resolve the issue, please call in to complete your order.

There are no messages in the log. The old version 6.x-1.0 works fine.

Any help would be appreciated.

Comments

tr’s picture

Category: bug » support
Priority: Major » Normal
sunward’s picture

new upgrade did not bring in any upgraded quotes. Got various errors like:
SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: ^ in .../modules/uc_canadapost/uc_canadapost.module on line 381.

tr’s picture

@sunward: That's a different issue entirely, and is being addressed in #441708: Errors/Warnings when trying to checkout after Canada Post quote received?.

neildmd’s picture

I am having the same issue as well. Works when if I roll back to 1.0 also. Definitely a malformed request or an improperly handled response.

iswilson’s picture

Version: 6.x-1.1 » 6.x-1.x-dev
Category: support » bug
Status: Active » Needs review
StatusFileSize
new8.29 KB

I was having this issue with my 6.x sites as well; quotes were being returned intermittently and no errors in the log.

While debugging I noticed that drupal_http_request() was recently updated in core. This patch updates _uc_canadapost_drupal_http_request() to match (it also includes the malformed response fix from http://drupal.org/node/183435), which fixes the issue on my sites.

tr’s picture

Version: 6.x-1.x-dev » 6.x-1.1
Category: bug » support
Status: Needs review » Active

@neildmd: By "the same issue", do you mean the same as the original poster, or the same as #2. If the latter, discussion of that belongs in #441708: Errors/Warnings when trying to checkout after Canada Post quote received?.

@iswilson: As I said in #3, the SimpleXML error is a different issue. Please post your patch in #441708: Errors/Warnings when trying to checkout after Canada Post quote received?.

Please confine further discussion in this thread to the matter reported by the original poster.

neildmd’s picture

@TR: Same as original poster. I will try the patch in #5 when I get a chance and report back.

bmacc’s picture

I installed the patch provided by iswilson on my development site but I am still unable to get a shipping quote.

tr’s picture

@neildmd, @bmacc: The patch from #5 is FOR A DIFFERENT PROBLEM that's being addressed in #441708: Errors/Warnings when trying to checkout after Canada Post quote received?.

The problem in the original post is 99.99% certain to be a configuration problem, and is 99.99% certain to have nothing to do with this module. There's lots of documentation both in the Ubercart issue queue and at ubercart.org on how to troubleshoot that generic error message that occurs for ALL shipping methods in Ubercart. I'm not too keen on repeating all that information here.

tr’s picture

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

I just tried updating to 6.x-1.1 again, and it's not returning any quotes for me at all. It is not a configuration issue as you are stating since I didn't change anything and rolling back to 1.0 it works fine. This is either a bug or a conflict with another module. One of these days I will strip down to basics and try it by enabling one module at a time.

tr’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
dewolfe001’s picture

Issue summary: View changes

I tried the patched code-- it gave a response that was immediately, but reported an error. I reverted to the old code and it waited for a response.
What I found was happening: my web host has port 30000 closed. When a port is closed, it appears to take forever for it to respond. I asked them to open the port and now the baseline code for uc_canadapost.module works. Check with your ISP to see if the port is open. Or, run this script (below) to check for yourself:

<?php 

$host = 'sellonline.canadapost.ca';
$ports = array(30000, 80); /* port 80 is known to be open and easingly accessible, so if 30000 and 80 both fail there is still another problem going on. */

print "looking at $host <br/>";
foreach ($ports as $port)
{
    $connection = @fsockopen($host, $port);
    if (is_resource($connection))
    {
        echo '<h2>' . $host . ':' . $port . ' ' . '(' . getservbyport($port, 'tcp') . ') is open.</h2>' . "\n";
        fclose($connection);
    }
    else
    {
        echo '<h2>' . $host . ':' . $port . ' is not responding.</h2>' . "\n";
    }
}

?>