+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Data at the root level is invalid. Line 1, position 1.

Data at the root level is invalid. Line 1, position 1.

4 posts, 0 answered
  1. Jess Askey
    Jess Askey avatar
    20 posts
    Registered:
    25 Feb 2010
    01 Jun 2010
    Link to this post
    I am running Sitefinity 3.7 under Vista and my development site has been working lovely for a few months now. Something happened in the past week which broke my ability to drop any built-in controls onto my pages. When dragging them over to the placeholders, I simply get a 'Object Reference not set to an instance of an object' in the designer. Publishing the page gives more specific information and the errors are different for each control... here are some examples...

    BlogPostings -> Data at the root level is invalid. Line 1, position 1.
    EventsView -> Data at the root level is invalid. Line 1, position 1.
    RadTabStrip -> Data at the root level is invalid. Line 1, position 1.

    I am running from source in Visual Studio 2010 using the ASP.NET Development server (not IIS)

    Thinking back to what I have changed in the past week or so, I have only done a few things that I can *remember*.

    - Added some fields to the profile configuration in web.config
    - Installed and then uninstalled Sitefinity 4.0 preview
    - Attempted to import some data into the sf_CMSContentBase, sf_CMSContentVersion and sf_GCMetaData tables to bring existing content from an old site. I have since, deleted all this content.

    The odd thing is that if I drag over a user control that I have authored from within Sitefinity/UserControls/MyFolder, then they seem to work so I must have broken something in the Sitefinity configuration engine???
    Any ideas on how I can troubleshoot this?

    Here is the stack trace for the BlogPost control upon pressing the 'Publish' button...

    [XmlException: Data at the root level is invalid. Line 1, position 1.]
       System.Xml.XmlTextReaderImpl.Throw(Exception e) +73
       System.Xml.XmlTextReaderImpl.Throw(String res, String arg) +122
       System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() +4076201
       System.Xml.XmlTextReaderImpl.ParseDocumentContent() +189
       System.Xml.XmlTextReaderImpl.Read() +145
       Telerik.Cms.Engine.Design.SettingsListConverter.GetSettingTypes(String serializedSettings) +140
       Telerik.Cms.Engine.Design.SettingsListConverter.DeserializeDesignerSettings(String settingsCollection) +109
       Telerik.Cms.Engine.Design.SettingsListConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) +64
       Telerik.Cms.Data.WebControlBase.LoadControl(Control control, PropertyDescriptorCollection properties) +193
       Telerik.Cms.Data.CmsWebControl.LoadControl(Control control, PropertyDescriptorCollection properties) +9
       Telerik.Cms.Data.WebControlBase.LoadControl(TemplateControl template, Control& control) +344
       Telerik.Cms.Data.WebControlBase.LoadControl(TemplateControl template) +25
       Telerik.Cms.Data.WebControlBase.LoadControl() +12
       Telerik.Cms.Data.StagedPage.GetRewriterServiceType(CmsWebControl ctrl) +83
       Telerik.Cms.Data.StagedPage.Copy(StagedPage source, PageContentBase target) +708
       Telerik.Cms.Data.StagedPage.Publish() +231
       Telerik.Cms.Data.StagedPage.CheckIn() +331
       Telerik.Cms.Web.UI.ToolBar.Button_Command(Object sender, CommandEventArgs e) +123
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +115
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +169
       System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +9
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
    

    thank you in advance! Jess
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    01 Jun 2010
    Link to this post
    Hello Jess Askey,

    The comes from one of the ContentView based controls you have on a page. it is possible that you have break something with the manual changes to the database related to control's Master and Detail settings where the value is a xml configuration. It looks like the xml is not well formed now and you get the errors.. Master and Detail settings data are collected in sf_CmsControlProperty table.

    You can use the following Select query to get all controls that have MasterSettings and DetailSettings properties and observe the returned value.

    SELECT TOP 1000 [ControlID]
          ,[Name]
          ,[ParentID]
          ,[ParentName]
          ,[Value]
      FROM [CMSDEV].[dbo].[sf_CmsControlProperty]
      WHERE Name = 'DetailSettings' or  Name = 'MasterSettings'


    When you find the problematic control you have to remove it and drop it on the page again or fix the not well formed XML.

    Another option for getting this error could be if you have build the project under .NET Framework 4.0 which is not supported yet. Check whether your application pool is running in .NET 2.0 or 3.5 and the build version of your project.

    Greetings,
    Ivan Dimitrov
    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.
  3. Jess Askey
    Jess Askey avatar
    20 posts
    Registered:
    25 Feb 2010
    02 Jun 2010
    Link to this post
    Hello Ivan...

    Thanks for the very detailed answer to my question, I appreciate your time on this...

    I ran the query and came up with zero records, which sort of makes sense as I really haven't populated any pages with controls except my own controls up to this point.

    Which leads us to your second point... .NET Framework 4.0.... I *am* running this under .NET 4.0 so I suppose this functionality has always been broken, I just haven't seen it happen until I started using the built-in controls just yesterday. So, I switched my web project over to 3.5 instead and Viola! it definitely is working now.

    Can I ask a question about Sitefinity 3.7 and .NET 4.0... I see now in other posts about others asking this question and the only response I have seen is that Sitefinity 3.7 is not supported under .NET 4.0... but why? I can't say I have had any problems move any of my ASP sites from 3.5 up to 4.0 so far. Isn't it just a matter of rebuilding the dependent .dlls on a 4.0 target for you all???? just wondering. :-)

    thanks for the answer... happily running under 3.5 now.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Jun 2010
    Link to this post
    Hi Jess Askey,

    There will be SP4 of Sitefinity 3.7 in the beginning of August where we will try to provide support for .NET Framework 4.0.

    Kind regards,
    Ivan Dimitrov
    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.
Register for webinar
4 posts, 0 answered