Skip to end of metadata
Go to start of metadata

I'm getting a JS runtime error identified in the Dynarch Horizontal Menu code and reported as:

Message: Type mismatch.
Line: 18
Char 1342
Code: 0

Any ideas about what is causing this? It shows up in IE8.

  • No labels


  1. Unknown User (denete)

    Using Confluence 3.2 and Theme Builder 4.0.2-RC.

  2. Unknown User (denete)

    So, actually errors are showing up in all browsers now.

    uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) nsIDOMHTMLDivElement.insertBefore" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: :: DynarchMenu :: line 18" data: no]

    Line 0

  3. Did you alter your DOCTYPE?

    Have you tried appending layout=DEFAULT to the url, eg:

    1. Unknown User (denete)

      Did not alter DOCTYPE.

      The errors seem to only appear on our 'Dashboard' view.

      When viewing with the layout=DEFAULT, there are no errors.

      I've narrowed it down to the following block in our Theme Builder "navigation" block.

      {li}{menulink:dashboard}[Submit a Product Idea{menuicon:add2|size=12}|ourprojects:Idea Form]{menulink}{li}
      {li}{menulink:dashboard}[Submit a Support Ticket{menuicon:add2|size=12}|]{menulink}{li}
       {menu}Tools {menuicon:navigate_close}
       {menu}Add {menuicon:navigate_close}
      1. For detailed debugging you will need a support contract

  4. Unknown User (

    I am encountering the same issue using Confluence 3.0.0_01 and Theme Builder 3.3.5-conf210.
    I realize these are older versions, but upgrading Confluence is not an option at this time due to departmental policies and a failed evaluation of the most recent versions.

    I tracked the issue down to the Dynarch Horizontal Menu javascript library, which is embedded in the layout resources, which was licensed by Adaptavist from a third party 4 years ago. I don't have the technical ability to track down the error in 4-year-old Javascript and make it work in the Theme Builder framework.

    Javascript error
    Error: uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLDivElement.insertBefore]"  
    nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"
    location: "JS frame :: :: DynarchMenu :: line 260"  data: no]

    The error doesn't have any overt signs of failure, but it does present a warning icon in Internet Explorer 7 and 8 which is eroding my VP's confidence in our Confluence/Theme Builder solution.

    If you're aware of a way to make this error go away, it would end a great many phone calls, office visits, and Jira tickets.

    Thanks in advance.

  5. Unknown User (ian)


    I was having this exact error too in FF and IE very annoying. I found the problem had something to do with anonymous users and something to do with webui menus. I then surrounded the webui-list menus with builder-hide tags so anonymous users dont get the error:


    (open bracket)builder-hide:action=dashboard,login,dologin|user=@anonymous}(close bracket)
    ...webui-list menues
    (open bracket)builder-hide(close bracket)

    There might be other action pages affected but you can add them in as you find them.

    Hopefully this error can be fixed properly so a workaround like this is not needed.

    Cheers, Ian

    1. Some of the atlassian webui links do not take very well to being called from the perspective of an anonymous user - they rely on the fact that most themes are very hard-coded affairs and make assumptions in their coding that they wont be called from the perspective of anonymous users (usually the problem is caused when they dont check to see if something is null or not before they use it).

      Similar problems can ocurr when you call webui links out of context, for instance if you are trying to display user-profile webui links on a non profile page then they can break. We have done as much as we possibly can to work around these issues however some pieces of webui code cant be fooled into thinking they are being called from their 'expected' context (sad)