Re: jquery.js Syntax Error

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

Around line 885 of uc_ups.module, you'll see this line:

<?php
  $request
= uc_ups_shipping_quote($ship_packages, $orig, $dest, $ups_service);
?>

Add a line after that to print out the $request string. Now the line above will look like this:

<?php
  $request
= uc_ups_shipping_quote($ship_packages, $orig, $dest, $ups_service);
 
drupal_set_message('<pre>'.$print_r($request).'</pre>');
?>

You can do the same for the $resp variable, which comes directly after the $request assignment - but that data is usually what is spat out during the Debug display. Unfortunately since it looks like your JS is choking somewhere it never gets to that point past the call to jquery.js.

So you can add that drupal_set_message line there, and then check for quotes, and reload the page - the $request that drupal sends out will be printed out as a gray message at the top of the content layer. Printing out the $response will at least let you make sure the POST is well-formed; doing the same for the $response will probably yield null if jquery is choking, which seems to be the case.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Not receiving UPS shipping quotes By: Zahor@drupal.org (78 replies) Wed, 11/14/2007 - 00:30