Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

XML Parsing Error


Go to End


7 Posts   3706 Views

Avatar
phinel

Community Member, 16 Posts

10 February 2009 at 1:48am

Edited: 10/02/2009 1:50am

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

Avatar
Fuzz10

Community Member, 791 Posts

10 February 2009 at 3:49am

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

Avatar
phinel

Community Member, 16 Posts

10 February 2009 at 6:16am

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

Avatar
Fuzz10

Community Member, 791 Posts

10 February 2009 at 6:19am

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

Avatar
phinel

Community Member, 16 Posts

10 February 2009 at 6:24am

in which file?

Avatar
Fuzz10

Community Member, 791 Posts

10 February 2009 at 9:04pm

In all off my class-files...

Avatar
aleangelico

Community Member, 2 Posts

8 September 2009 at 10:07am

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" xml: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