This is a migrated thread and some comments may be shown as answers.

'undefined' is null or not an object error when using RadMenu for TopSiteMap navigation

1 Answer 86 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Frank Witte
Top achievements
Rank 1
Frank Witte asked on 23 Sep 2010, 11:33 AM

I've deployed the Telerik.Web.UI.dll and Telerik.Web.Design.dll into the GAC on my SharePoint 2010 server (Enterprise Edition).
I've added the DLLs to the <SafeControls> section in the web.config of my SharePoint Web Application

Using the Starter Master Pages (codeplex), I've registred the Telerik.Web.UI tag prefix in the Master Page:

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2010.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %> 

I'm using the default scriptmanager:
<asp:ScriptManager id="ScriptManager" runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true" />


I've replaced the ASPmenu with a RADMenu:
<PublishingNavigation:PortalSiteMapDataSource
            ID="topSiteMap"
            runat="server"
            EnableViewState="false"
            SiteMapProvider="CombinedNavSiteMapProvider"
            StartFromCurrentNode="true"
            StartingNodeOffset="0"
            ShowStartingNode="false"
            TrimNonCurrentTypes="Heading" StartingNodeUrl="/"/>
  
        <!-- top navigation menu (set to use the new Simple Rendering) -->
        <!--<SharePoint:AspMenu
          ID="TopNavigationMenuV4"
          Runat="server"
          EnableViewState="false"
          DataSourceID="topSiteMap"
          AccessKey="<%$Resources:wss,navigation_accesskey%>"
          UseSimpleRendering="true"
          UseSeparateCss="false"
          Orientation="Horizontal"
          StaticDisplayLevels="1"
          MaximumDynamicDisplayLevels="1" 
          SkipLinkText=""
          CssClass="s4-tn">
        </SharePoint:AspMenu>-->
        <telerik:RadMenu ID="TopNavigationTabStrip" runat="server" DataSourceID="topSiteMap" />

When I view the page in IE or Firefox, I get a JavaScript error:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; Media Center PC 6.0; InfoPath.3; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Timestamp: Thu, 23 Sep 2010 10:31:37 UTC

Message: 'undefined' is null or not an object
Line: 5
Char: 94383
Code: 0
URI: http://XXX:####/ScriptResource.axd?d=WswgWMgKZb031fWGc9I5ZLzgi20lxIllsJPhxdY4UBJLJ1TFFFRh_e3Vyqj6roU61CRKpyn1RoxLJbHJKmEDp4foWysMWkjHZqVGbNmmHaY1&t=ffffffffec2d9970

 

Have I missed something, or is this a known issue?

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 27 Sep 2010, 12:10 PM
Hello Frank,

I've answered to your bug report. I'm also posting the reply here for community reference.

Everything seems fine with the RadControls registration. The only problem we can spot is the comment you've used to remove the old menu:

<!--<SharePoint:AspMenu>
</SharePoint:AspMenu>-->

This is an HTML comment and it will not stop the control from rendering and registering its scripts. The browser will however ignore the control markup. This is the most likely reason for the error you're receiving.

Please use a server-side comment or remove the content altogether:

<%--<SharePoint:AspMenu>
</SharePoint:AspMenu>--%>

I hope this helps.

Sincerely yours,
Tsvetomir Tsonev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Sharepoint Integration
Asked by
Frank Witte
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or