Copied to clipboard

Flag this post as spam?

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


  • Jesper Ordrup 1000 posts 1478 karma points MVP
    Aug 14, 2014 @ 07:59
    Jesper Ordrup
    0

    Site offline - umbracoLog says "The document does not have a root element"

    Hi all,

    Suddenly the site is offline. We can log in to backend. We can publish without error messages in ui. But nothing is actually published. Looking at the umbracoLog I find:

    Xml wasn't saved: System.Xml.XmlException: Invalid XML document, The document does not have a root element..
       at System.Xml.XmlDocument.Save(String filename)
       at umbraco.content.SaveContentToDisk(XmlDocument xmlDoc)

    This is an old Umbraco 3.05 which has been running for ages without any problems. And there's been no developer activities on it. 

    Any experience with that?

    I've tried:

    • Rightclick content node and Republish whole structure. UI says great. Log says the above. Site remains offline.
    • Rightclick root node and publish (all nodes).  UI says great. Log says the above. Site remains offline.
    • Unpublish all. Create one new node. Publish. Log says the above. Site remains offline.

    best
    Jesper

     

  • Chriztian Steinmeier 2726 posts 8320 karma points MVP 4x admin c-trib
    Aug 14, 2014 @ 08:34
    Chriztian Steinmeier
    0

    Hi Jesper,

    It's definitely got to do with the Umbraco.config file (it's a generic XML error).

    I seem to remember having had a similar error recently on a newer site, where I deleted the Umbraco.config, and hit the site again...

    Though all logic tells me that the steps you've already tried should have performed something similar already.

    /Chriztian

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Aug 14, 2014 @ 10:33
    Sebastiaan Janssen
    0

    Could it be that there's illegal characters copy/pasted into the content in the backoffice?

    Open up umbraco.config in Notepad++ (or something like it) and see if there's control characters that show up. enter image description here

    Also check in an xml validator if the xml is valid and if not, where it is invalid, that might help.

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Aug 14, 2014 @ 10:36
    Sebastiaan Janssen
    0

    Ps. A regex to find control characters that can be used in regexr.com:
    (?![\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F\uFEFF\uFFFE\uFFFF]

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies