Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    May 19, 2011 @ 22:51
    Anthony Dang
    0

    Help! XmlException: There are multiple root elements

    This started happening today.

    When I click on a template (masterpage) I get a yellow screen of death with this error: XmlException: There are multiple root elements. I can create a new template in Umbraco but it crashes too.

     

    What can be causing this?

     


  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    May 19, 2011 @ 23:06
    Lee Kelleher
    0

    Hi Anthony,

    Sounds like your "umbraco.config" has corrupted somehow?  Try deleting it, then restarting Umbraco (either by restarting your AppPool in IIS, or simpily touching the Web.config) ... that should re-generate the XML cache in "umbraco.config".

    Let us know how you get on.  Hopefully it's nothing more serious.

    Cheers, Lee.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    May 19, 2011 @ 23:09
    Anthony Dang
    0

    That sounds really odd.

    A corrupted umbraco.config file can cause crashes when viewing masterpages from withing Umbraco?

     

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    May 19, 2011 @ 23:16
    Lee Kelleher
    0

    Ahhh sorry, misread your post! Thought you meant on the front-end.

    Weird that it throws an XmlException. Would you mind posting the stack-trace from the YSoD?

    Cheers, Lee.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    May 19, 2011 @ 23:21
    Anthony Dang
    0

    The stack trace is at work. I'll post it first thing in the morning.

    Another thing which may not be related is that the packages tree would not expand. I checked the response with firebug and it was some internal error with the tree service. Could that be related?

    I'll post both errors tomorrow.

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 19, 2011 @ 23:32
    Jan Skovgaard
    0

    Hi Anthony

    That seems very odd. Don't know if this could be because the permissions perhaps have been messed up somehow? Have you made any changes to the installation or the server duing the day?

    /Jan

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    May 19, 2011 @ 23:38
    Anthony Dang
    0

    Hey Jan

    We're still in dev so it's happening on localhost using VS and IIS Express. But the DB is on the dev server. 

    We've been making new masterpages, doctypes, macros etc all day. Could it be file permissions with the masterpages? Normally file permissions only result in the inability to save the file right?

     

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 19, 2011 @ 23:56
    Jan Skovgaard
    0

    Hi Anthony

    Ok, then it's probably not a permission issue...I guess it could also return a 404 if you're trying to access something you're not allowed to see.

    But maybe some weird characters have been added in a alias name of the template somwhere? This can potentially mess up the template section in my experience.

    You could try to have a look in the database to see if some of the aliases looks weird if you can't access them in the template folder in the settings section.

    It's hard to tell where things go wrong, so this is just to be considered as a pointer :-)

    /Jan

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    May 20, 2011 @ 00:15
    Anthony Dang
    0

    i was hoping i wouldnt have to dive into the db... damn.

    but wierd characters does sound plausible.

     

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 20, 2011 @ 00:29
    Jan Skovgaard
    0

    Hi Anthony

    Well, it does not hurt to have a look at the DB - if you need to make changes through the DB then you should of course be certain of what you're doing :-)

    /Jan

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    May 20, 2011 @ 10:36
    Anthony Dang
    0

    Ok so it seems there are no crazy characters in the cmstemplate table.

    I think I may need to look into the source...

    Here is the error:

     

     

     

    There are multiple root elements. Line 1038, position 4.

    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.Xml.XmlException: There are multiple root elements. Line 1038, position 4.

    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:

    [XmlException: There are multiple root elements. Line 1038, position 4.]
       System.Xml.XmlTextReaderImpl.Throw(Exception e) +73
       System.Xml.XmlTextReaderImpl.Throw(String res, String arg) +122
       System.Xml.XmlTextReaderImpl.ParseDocumentContent() +4075852
       System.Xml.XmlTextReaderImpl.Read() +145
       System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) +57
       System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) +20
       System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +131
       System.Xml.XmlDocument.Load(XmlReader reader) +114
       System.Xml.XmlDocument.Load(String filename) +128
       umbraco.cms.businesslogic.skinning.Skinning.StarterKitGuid(Int32 template) +152
       umbraco.cms.presentation.settings.editTemplate.OnInit(EventArgs e) +1874
       System.Web.UI.Control.InitRecursive(Control namingContainer) +140
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +480
    
  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    May 20, 2011 @ 10:44
    Lee Kelleher
    3

    Hi Anthony,

    From looking through the source of the "StarterKitGuid" method, it tries to load in the following XML/config... "~/App_Data/packages/installed/installedPackages.config"

    ... and that's where its falling over!  Open that config file, go to line 1038 ... see if there's another root <packages> node ... if so, try to merge them - so that there's only one root node.

    Good luck!

    Cheers, Lee.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    May 20, 2011 @ 11:09
    Anthony Dang
    0

    That was the problem.

    Someone deleted the opening <packages> tag from that file. It caused both issues.

    Lee I owe you a beer!

     

     

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    May 20, 2011 @ 11:12
    Lee Kelleher
    0

    Cool, glad that you've got it sorted!

    See you at CG11.

    Cheers, Lee.

  • David Dupont 61 posts 115 karma points
    Oct 30, 2013 @ 07:36
    David Dupont
    1

    Lee you just rocks as usual. Saved a lot of my time :-)

Please Sign in or register to post replies

Write your reply to:

Draft