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.
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.
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?
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?
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?
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 :-)
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 :-)
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.
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.
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?
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.
That sounds really odd.
A corrupted umbraco.config file can cause crashes when viewing masterpages from withing Umbraco?
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.
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.
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
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?
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
i was hoping i wouldnt have to dive into the db... damn.
but wierd characters does sound plausible.
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
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:
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.
That was the problem.
Someone deleted the opening <packages> tag from that file. It caused both issues.
Lee I owe you a beer!
Cool, glad that you've got it sorted!
See you at CG11.
Cheers, Lee.
Lee you just rocks as usual. Saved a lot of my time :-)
is working on a reply...