简体   繁体   中英

Why am I getting this error “Invalid argument”?

On one page I have an error that only happens in IE 8 (possibly other versions of IE, but 8 is what I have installed).

Message: Invalid argument.
Line: 31
Char: 1
Code: 0
URI: https://verify.authorize.net/anetseal/seal.js

This error is causing the page to stop rendering and it just appears to keep loading (the tab has the loading icon and says "Connecting...").

This is the relevant code:


<div id="verisign"> 
  <script type="text/javascript" language="javascript">var ANS_customer_id="myid_taken_out";</script> 
  <script type="text/javascript" language="javascript" src="//verify.authorize.net/anetseal/seal.js" ></script> <a href="http://www.authorize.net/" id="AuthorizeNetText" target="_blank"></a>
</div>
This is referenced on uc_cart.pages.inc in the ubercart module.

Remove their verified merchant seal snippet and contact Authorize.net to lodge a complaint/ticket.

I was a) happy to find that after debugging our site this evening for ~4 hours, in response to a crisis mode issue from customers, that removing it immediately restored our functionality on IE7/8 browsers (version 9, I believe is not affected, although I'm not 100% sure), then b) googled for problems and was shocked to find that the issue with Authorize.net's verified merchant seal snippet has been in force since at least 2011.

To be clear, today is January 29, 2013

If I had to guess, since they isn't a lot of infomation here; I think you have an extra comma in an object like this:

var obj = {t:0,a:1},

Trailing commas are parsed out by most browsers but it really screws up IE

window.ANS_customer_id must be undefined

You could try doing this instead:

<script type="text/javascript">window.ANS_customer_id="myid_taken_out";</script>

It's possible that the way you had it set before wasn't resolving to window (like it should), depending on your browser. I've never seen that before, but being explicit doesn't hurt.

This is the line in that seal.js file that's breaking:

if( window.ANS_customer_id )

It's also possible that my hair is a bird .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM