MOSS and RadSplitter (Invalid JSON)

3 posts, 0 answers
  1. Chris Duden
    Chris Duden avatar
    12 posts
    Member since:
    May 2008

    Posted 18 Mar 2009 Link to this post

    I am building a custom masterpage based upon the blueband.master master page.  I have a radtabpane control for navigation and have added a radsplitter.  Relavent code: 

                                <telerik:RadSplitter Runat=server id="RadSplitter1" Height="100%" Width="100%" Skin="Office2007">  
                                    <telerik:RadPane Runat="server" id="RadPane1" Scrolling="None">  
                                    <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" />  
                                    </telerik:RadPane>  
                                    <telerik:RadSplitBar Runat="server" id="RadSplitBar1" CollapseMode="Backward" />  
                                    <telerik:RadPane Runat="server" id="RadPane2" Width="200px" Scrolling="None" MaxWidth="200" MinWidth="200">  
                                    <telerik:RadPanelBar Runat="server" id="RadPanelBar1" Skin="Office2007">  
                                        <Items>  
                                            <telerik:RadPanelItem runat="server" Text="Hot Topics">  
                                                <ItemTemplate>  
                                                    <cc1:SiteNews ID="SiteNews1" runat="server" ListName="Hot Topics"/>  
                                                </ItemTemplate>  
                                            </telerik:RadPanelItem>  
                                            <telerik:RadPanelItem runat="server" Text="News and Events">  
                                                <ItemTemplate>  
                                                    <cc1:SiteNews2 ID="SiteNews2" runat="server" ListName="Hot Topics"/>  
                                                </ItemTemplate>  
                                            </telerik:RadPanelItem>  
                                        </Items>  
                                    </telerik:RadPanelBar>  
                                    </telerik:RadPane>  
                                </telerik:RadSplitter>  
     

    cc1:SiteNews2 and cc1.SiteNews are custom controls.  It doesn't matter if they are in there or not, it still gives the error.
    The page I am having a problem with is empty except for I have added an announcements web part (OOTB).  When I attempt to edit an item and save it I get this error:

    Invalid JSON primitive: .

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentException: Invalid JSON primitive: .

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ArgumentException: Invalid JSON primitive: .]
       System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializePrimitiveObject() +873984
       System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) +434
       System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) +78
       System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) +70
       Telerik.Web.UI.RadWebControl.LoadPostData(String postDataKey, NameValueCollection postCollection) +126
       System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +945
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2071
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

    If I remove the code posted in the first code block the error goes away and I can save the item.

    Entire source code for masterpage:

    <%@ Master language="C#" %> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
    <%@ Import Namespace="Microsoft.SharePoint" %> 
    <%@ Register Tagprefix="SPSWC" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
    <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
    <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
    <%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
    <%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
    <%@ Register TagPrefix="wssuc" TagName="Welcome" src="~/_controltemplates/Welcome.ascx" %> 
    <%@ Register TagPrefix="wssuc" TagName="DesignModeConsole" src="~/_controltemplates/DesignModeConsole.ascx" %> 
    <%@ Register TagPrefix="PublishingVariations" TagName="VariationsLabelMenu" src="~/_controltemplates/VariationsLabelMenu.ascx" %> 
    <%@ Register Tagprefix="PublishingConsole" TagName="Console" src="~/_controltemplates/PublishingConsole.ascx" %> 
    <%@ Register TagPrefix="PublishingSiteAction" TagName="SiteActionMenu" src="~/_controltemplates/PublishingActionMenu.ascx" %> 
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2009.1.311.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %> 
    <%@ Register TagPrefix="cc1" Namespace="ADE_Public_News" Assembly="ADE_Public_News, Version=1.0.0.0, Culture=neutral, PublicKeyToken=30c0b817b583c5c5" %> 
    <html dir="<%$Resources:wss, multipages_direction_dir_value %>" runat="server" __expr-val-dir="ltr">  
    <head runat="server">  
        <meta name="GENERATOR" content="Microsoft SharePoint">  
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  
        <meta http-equiv="Expires" content="0">  
        <SharePoint:RobotsMetaTag runat="server"/>  
        <title id="onetidTitle">  
            <asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server"/>  
        </title> 
        <Sharepoint:CssLink runat="server"/>  
        <!--Styles used for positioning, font and spacing definitions--> 
        <SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/Style Library/~language/Core Styles/Band.css%>" runat="server"/>  
        <SharePoint:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/controls.css %>" runat="server"/>  
        <SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/Style Library/zz1_blue.css%>" runat="server"/>  
        <SharePoint:ScriptLink name="init.js" runat="server"/>  
        <!--Placeholder for additional overrides--> 
        <asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server"/>  
    </head> 
    <body class="body" onload="javascript:_spBodyOnLoadWrapper(); SetSearchBoxLoc();" > 
        <form runat="server" onsubmit="return _spFormOnSubmitWrapper();">  
        <input id="ctl00_RadPanelBar1_ClientState" name="ctl00_RadPanelBar1_ClientState" type="hidden" /> 
        <input id="ctl00_RadSplitBar1_ClientState" name="ctl00_RadSplitBar1_ClientState" type="hidden" /> 
        <script language="javascript" type="text/javascript">  
            window.onresizeSetSearchBoxLoc;  
              
            function getY( oElement )  
            {  
                //alert('in getY');  
                var iReturnValue = 0;  
                while( oElement != null )   
                {  
                    iReturnValue += oElement.offsetTop;  
                    oElementoElement = oElement.offsetParent;  
                }  
                return iReturnValue;  
            }  
            function getX(obj)  
            {  
                var curleft = 0;  
                if(obj.offsetParent)  
                    while(1)   
                    {  
                      curleft += obj.offsetLeft;  
                      if(!obj.offsetParent)  
                        break;  
                      objobj = obj.offsetParent;  
                    }  
                else if(obj.x)  
                    curleft += obj.x;  
                return curleft;  
            }  
     
            function getElementHeight(Elem)   
            {  
                var xPos = Elem.offsetHeight;  
                return xPos;  
            }  
              
            function getElementWidth(Elem)   
            {  
                var xPos = Elem.offsetWidth;  
                return xPos;  
          
            }  
            function SetSearchBoxLoc()  
            {  
                var contY = 0;  
                var contX = 0;  
                var contWidth = 0;  
                var cont = document.getElementById('navmenu');  
                var searchElem = document.getElementById('searchHolder');  
                //alert('elem');  
                contX = getX(cont);  
                contY = getY(cont);  
                  
                  
                contWidth = getElementWidth(cont);  
                //alert('width: ' + contWidth);  
                var xPos = contX + contWidth - 180;  
                  
                searchElem.style.position="absolute";  
                searchElem.style.top=contY + 'px';  
                searchElem.style.left=xPos + 'px';  
                              
                //alert('x: ' + contX);  
                //alert('y: ' + contY);  
            }  
              
        </script> 
        <WebPartPages:SPWebPartManager runat="server"/>  
        <asp:ScriptManager runat="server" ID="ScriptManager1" /> 
        <table cellpadding="0" cellspacing="0" class="master">  
            <tr> 
                <td height="100%" class="shadowLeft">  
                    <div class="spacer">  
                    </div> 
                </td> 
                <td valign="top">  
                    <table cellpadding="0" cellspacing="0" width="100%" class="masterContent">  
                                    <tr style="height:0px"><td> 
                                        <wssuc:DesignModeConsole id="IdDesignModeConsole" runat="server"/></td></tr>  
                    <tr> 
                        <td colspan="2" class="authoringRegion">  
                                 <span class="siteActionMenu">  
                                    <PublishingSiteAction:SiteActionMenu runat="server"/>  
                                </span> 
                            <div class="sharepointLogin">  
                            <!--Authentication for Authors only--> 
                                <table cellpadding="0" cellspacing="0" > 
                                    <tr> 
                                        <td class="ms-globallinks">  
                                        <SharePoint:DelegateControl ControlId="GlobalSiteLink1" Scope="Farm" runat="server"/></td> 
                                        <td class="ms-globallinks">  
                                        <SharePoint:DelegateControl ControlId="GlobalSiteLink2" Scope="Farm" runat="server"/></td> 
                                        <td class="ms-globallinks">  
                                        <wssuc:Welcome id="explitLogout" runat="server"/></td> 
                                    </tr> 
                                </table> 
                            </div> 
                            <div class="console">  
                                <PublishingConsole:Console runat="server"/>  
                            </div> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td colspan="2" > 
                            <table cellpadding="0" cellspacing="0" width="100%">  
                                <tr> 
                                    <td colspan="4">  
                                        <table cellpadding="0" cellspacing="0" width="100%">  
                                            <tr> 
                                                <td class="topAreaLeft"/>  
                                                <td colspan="2" class="topAreaMid"/>  
                                                <td class="topAreaRight">  
                                                  
                                                    <div class="topLinkBar">  
                                                        <div class="topLink">  
                                                        <PublishingVariations:VariationsLabelMenu id="labelmenu1" runat="server"/></div> 
                                                    </div> 
                                                </td> 
                                            </tr> 
     
                                        </table> 
                                    </td> 
                                <tr class="topNavContainer">  
                                    <td class="topNavRoundLeft">  
                                        <div class="glassSpacerLeft" /> 
                                    </td> 
                                    <td valign="top" style="width:100%" id="navmenu" colspan="2">  
                                        <telerik:RadTabStrip runat="server" ID="RadTabStrip1" DataSourceID="siteMapDataSource1" Skin="Office2007" OnClientLoad="SetSearchBoxLoc"/>  
                                        <PublishingNavigation:PortalSiteMapDataSource ID="siteMapDataSource1" Runat="server" 
                                                    SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true" 
                                                    StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false" 
                                                    TreatStartingNodeAsCurrent="false" TrimNonCurrentTypes="Heading"/>  
                                    </td> 
                                    <td class="topNavRoundRight" > 
                                        <div class="glassSpacerRight" /> 
                                    </td> 
                                </tr> 
                            </table> 
                    </td> 
                </tr> 
                <tr> 
                    <td colspan="2">  
                        <table  cellpadding="0" cellspacing="0" width="100%">  
                            <tr> 
                                <td width="100%">  
                                    <asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server">  
                                        <div class="breadcrumb">  
                                            <asp:SiteMapPath ID="siteMapPath" Runat="server" SiteMapProvider="CurrentNavSiteMapProviderNoEncode" 
                                                RenderCurrentNodeAsLink="false" CurrentNodeStyle-CssClass="breadcrumbCurrent" NodeStyle-CssClass="ms-sitemapdirectional"/>  
                                        </div> 
                                    </asp:ContentPlaceHolder> 
                                </td> 
                                <td> 
                                    <asp:ContentPlaceHolder ID="PlaceHolderMiniConsole" runat="server" /> 
                                </td> 
                            </tr> 
                        </table> 
                    </td> 
                </tr> 
                <tr> 
                    <td valign="top">  
                        <asp:ContentPlaceHolder id="PlaceHolderCalendarNavigator" runat ="server" /> 
                        <asp:ContentPlaceHolder id="PlaceHolderLeftNavBarTop" runat="server" Visible="false" /> 
                        <asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server" Visible="false">  
                        </asp:ContentPlaceHolder> 
                        <asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat ="server" /> 
                        <asp:ContentPlaceHolder id="PlaceHolderNavSpacer" runat="server" Visible="false">  
                            <div class="leftNavSpacer"/>  
                        </asp:ContentPlaceHolder> 
                    </td> 
                    <td width="100%" valign="top">  
                        <div class="mainContainer" id="MSO_ContentDiv" runat="server">  
                            <div class="pageTitle">  
                                <asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" /> 
                            </div> 
                            <div class="mainContent">  
                                <telerik:RadSplitter Runat=server id="RadSplitter1" Height="100%" Width="100%" Skin="Office2007">  
                                    <telerik:RadPane Runat="server" id="RadPane1" Scrolling="None">  
                                    <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" /> 
                                    </telerik:RadPane> 
                                    <telerik:RadSplitBar Runat="server" id="RadSplitBar1" CollapseMode="Backward" /> 
                                    <telerik:RadPane Runat="server" id="RadPane2" Width="200px" Scrolling="None" MaxWidth="200" MinWidth="200">  
                                    <telerik:RadPanelBar Runat="server" id="RadPanelBar1" Skin="Office2007">  
                                        <Items> 
                                            <telerik:RadPanelItem runat="server" Text="Hot Topics">  
                                                <ItemTemplate> 
                                                    <cc1:SiteNews ID="SiteNews1" runat="server" ListName="Hot Topics"/>  
                                                </ItemTemplate> 
                                            </telerik:RadPanelItem> 
                                            <telerik:RadPanelItem runat="server" Text="News and Events">  
                                                <ItemTemplate> 
                                                    <cc1:SiteNews2 ID="SiteNews2" runat="server" ListName="Hot Topics"/>  
                                                </ItemTemplate> 
                                            </telerik:RadPanelItem> 
                                        </Items> 
                                    </telerik:RadPanelBar> 
                                    </telerik:RadPane> 
                                </telerik:RadSplitter> 
                                  
                            </div> 
                        </div> 
                    </td> 
                </tr> 
            </table> 
            </td> 
            <td height="100%" class="shadowRight">  
                <div class="spacer">  
                </div> 
            </td> 
            </tr> 
            </table> 
            <asp:panel visible="false" runat="server">  
                <asp:ContentPlaceHolder ID="PlaceHolderPageImage" runat="server" /> 
                <asp:ContentPlaceHolder ID="PlaceHolderBodyLeftBorder" runat="server" /> 
                <asp:ContentPlaceHolder ID="PlaceHolderTitleLeftBorder" runat="server" /> 
                <asp:ContentPlaceHolder ID="PlaceHolderTitleAreaSeparator" runat="server" /> 
                <asp:ContentPlaceHolder ID="OSSConsole" runat="server" /> 
                <asp:ContentPlaceHolder ID="PlaceHolderTitleRightMargin" runat="server" /> 
                <asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat ="server" /> 
                <asp:ContentPlaceHolder id="PlaceHolderBodyAreaClass" runat ="server" /> 
                <asp:ContentPlaceHolder id="PlaceHolderTitleAreaClass" runat ="server" /> 
                <asp:ContentPlaceHolder id="PlaceHolderBodyRightMargin" runat="server" /> 
            </asp:panel> 
            <div class="search" id="searchHolder">  
                <asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">  
                    <SPSWC:SearchBoxEx id="SearchBox" RegisterStyles="false" TextBeforeDropDown="" TextBeforeTextBox="<%$Resources:cms,masterpages_searchbox_label%>" TextBoxWidth="100" GoImageUrl="<% $SPUrl:~sitecollection/Style Library/Images/Search_Arrow.jpg %>" 
                        GoImageUrlRTL="<% $SPUrl:~sitecollection/Style Library/Images/Search_Arrow_RTL.jpg %>" UseSiteDefaults="true" DropDownMode = "HideScopeDD" SuppressWebPartChrome="true" runat="server" WebPart="true" __WebPartId="{724C5110-9CDA-4612-94B6-E6317505264C}"/>  
                </asp:ContentPlaceHolder> 
            </div> 
              
              
              
              
              
              
              
          
              
              
              
              
              
              
              
        </form> 
     </body> 
    </html> 
     

    Any idea why I am getting this error?
  2. Chris Duden
    Chris Duden avatar
    12 posts
    Member since:
    May 2008

    Posted 20 Mar 2009 Link to this post

    The silence is deafening.  LOL.  Did I post this in the wrong place or something? 

    I have played around with this a lot, the only way to get the error to go away is to remove the RadSplitter from the masterpage (not a solution).  I have also seen another strange behavior:  When you maximize the window the splitter doesn't resize to fill the screen despite being set to 100%.  If I resize the browser it does but not if I "restore down" or maximize it.

    CMD
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 24 Mar 2009 Link to this post

    Hi Chris Duden,

    I apologize for the late response. There is SP1 of 2009.1.311 RadControls for ASP.NET AJAX release scheduled for next week. So as you can Imagine we are overwhelmed with work. As you know the new version of Internet Explorer has been released. So one of the main goals of this service pack is fixing some IE8 issues.

    Now on the problem. Actually I was able to achieve the functionality that you describe in your post. In order to do so I strictly followed the following help articles.
    1.  Extending your MOSS site with Microsoft ASP.NET AJAX 3.5
    2. Deploying RadControls for ASP.NET Ajax
    3. Incorporating RadControls for ASP.NET Ajax in MOSS WebSites

    Please make sure that you followed these articles strictly, in order to enable RadControls for ASP.NET AJAX in your web site.

    If reviewing the articles does not help, we will need some additional information. I can see that you opened a support thread pointing to this forum thread. You can provide us with your web.config file there.

    For your convenience I will paste this answer in the support article as well. Also I will attach a movie, where you can see my test.


    Kind regards,
    Stanimir
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top