When editing my page and clicking on add web part, a JavaScript error occurs saying wpadder.debug.js invalid argument error. This just happens on ie7, 8 and 9. Chrome is working well as is Firefox. Do you have any ideas what may be causing this?

  • 1
    Can you please confirmo if you have any custom javascript code running on the aforementioned page? – BlueSoul Jan 18 '12 at 8:07
  • 1
    Are u using custom master page? If yes, can you try adding the web part usng default master page and check if the error persists? – Deepu Nair Jan 18 '12 at 8:08
  • Working Normally with a default master page , so the problem is in my master page , but any clue what might cause that ? as javascrit conflit , or specific js or a webpart that is not working good with an error..any ideas – Hassan Jan 18 '12 at 8:42

I worked with custom javascript embedded in webparts and had the same error. Might happen if there´s code overwriting existing methods of SharePoint used Javascript. In my case, it was code adding logic to the array.indexOf, which was not working for IE, so I implemented it myself. But just that was responsible for the error. My guess is, that SharePoint used a array.indexOf method itself and I accidently overwritten it.


Since its a custom master page issue, it will be difficult to understand the problem from outside. What you can do is comment your css and even any js files that you have included in your custom master page and check out.

If it does not resolve, comment parts of code or areas in your master page that you doubt could cause the problem, check in and see whether the changes resolves the problem. You can narrow down your commenting to small pieces of line once you have identified the area.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.