Annual Documentation Survey

Do you have 4 minutes to help us improve our documentation? Please take our annual survey!

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

8 Comments

  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 :: http://confluence.ddtc.cmgdigital.com:8080/plugins/builder/layout-resources.action?layoutId=CMGDIGITALINTRANET&resource=javascript&hash=-123448746 :: DynarchMenu :: line 18" data: no]

    Line 0

  3. Did you alter your DOCTYPE?

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

    http://www.adaptavist.com/display/Builder/Type+Mismatch+ERROR+in+menus+under+IE8?layout=DEFAULT

    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.

      {div:id=headerImagery} 
      {div}
      {div:id=innerNavigationDiv}
      {table:width=100%|cellpadding=0|cellspacing=0|border=0}
      {builder-hide:action=login}
      {tr}
      {td:valign=top}
      {builder-breadcrumbs}
      {td}
      {td:align=right|valign=middle}
      {ul:id=submitLinks}
      {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}|http://helpdesk.xyz.com/]{menulink}{li}
      {ul}
      {td}
      {tr}
      {builder-hide}
      {tr}
      {td:align=right|valign=middle|colspan=2}
      
      {menubar:id=ToolAddEditMenus}
      
      {builder-show:context=page,blogpost|mode=view}
       {menu}Tools {menuicon:navigate_close}
         {wikimenu}{webui-list:system.content.action|separators=true}{wikimenu}
       {menu}
       {menu}Add {menuicon:navigate_close}
         {wikimenu}{webui-list:system.content.add|separators=true}{wikimenu}
       {menu}
      {builder-show}
      {builder-show:permission=edit}
      {compound-menuitem:edit|caption=Edit|icon=document_edit|class=editLink}
      {builder-show}
      {builder-show:context=page,blogpost|mode=view}
      {compound-menuitem:favourite|caption=Favorite|class=favoriteToggleLink}
      {builder-show}
      {menubar}
      {td}
      {tr}
      {table}
      {div}
      
      1. For detailed debugging you will need a support contract

  4. Unknown User (david.mcintyre@stanford.edu)

    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 :: http://as.stanford.edu/stanford/plugins/builder/layout-resources.action?layoutId=OFFICIAL&resource=javascript&hash=779936610 :: 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)

    Hi,

    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)