Jump to:

23550 Posts in 19336 Topics by 2890 members

General Questions

SilverStripe Forums » General Questions » XML Parsing Error

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2736 Views
  • phinel
    Avatar
    Community Member
    16 Posts

    XML Parsing Error Link to this post

    Hello

    I have installed a website for somebody a few months ago. Until the last week he never had problems. Since last week, the site isn't accessible anymore through Firefox (IE works without errors).

    Error:

    XML Parsing Error: XML or text declaration not at start of entity
    Location: http://www.cmln.ch/
    Line Number 112, Column 1:

    <?xml version="1.0" encoding="UTF-8"?>
    ^

    He has no idea how to change templates or other important stuff on the page. He only knows how to change pages through the backend or to upload images through FTP. And that is the only thing he did last week. And i have nothing changed...

    Has anybody an idea what this could be?

    Thanks a lot
    phinel

  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Re: XML Parsing Error Link to this post

    Check that are no characters behind the ?> closing tags in your sourcecode....

  • phinel
    Avatar
    Community Member
    16 Posts

    Re: XML Parsing Error Link to this post

    Hello

    Thanks for your answer.

    As i can see in the source code, there are no characters.

    As nobody has changed the ss-Files or the template it's very strange.

    Thanks
    phinel

  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Re: XML Parsing Error Link to this post

    I usually leave out the PHP end tags ?> to make sure the XML output is valid..... You could try that.. ;)

  • phinel
    Avatar
    Community Member
    16 Posts

    Re: XML Parsing Error Link to this post

    in which file?

  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Re: XML Parsing Error Link to this post

    In all off my class-files...

  • aleangelico
    Avatar
    Community Member
    2 Posts

    Re: XML Parsing Error Link to this post

    Ok, I got it.

    The message is telling you the problem (I had exactly the same)
    Check Page.ss in your "Theme/Template" folder.

    I had this:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" >
       <head>
          <% base_tag %>

    So, I deleted

    <?xml version="1.0" encoding="UTF-8"?>


    from the top of Page.SS and that was it!

    This happened to me after changing the Page Type of my Home page, the SilverStripe took too long so I navigated out of the CMS and something got broken...

    Regards
    Alex

    2736 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.