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.

General Questions /

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

XML Parsing error?


Reply


4 Posts   1228 Views

Avatar
ajohri

Community Member, 2 Posts

20 May 2011 at 3:03am

I tried to create a pagetype using the tutorial theme (which comes default with the SilverStripe installation).
Everything ran well. Next day when I tried to login as an admin(localhost/myproj/admin), it gave me a below error.

XML Parsing Error: not well-formed
Location: http://localhost/mysp5/Security/login?BackURL=%2Fmysp5%2Fadmin%2F
Line Number 78, Column 26:      <div class="clear"><!-- --></div>
---------------------------------------^

Any clue...if I need to add any function ...., I tired everything...dev/build, ?flush=1...etc.

Thanks,
Anita

Avatar
Willr

Forum Moderator, 5513 Posts

21 May 2011 at 10:54am

I would recommend removing the xml header from the top of the Page.ss file. Sending XHTML as proper XML seemed like a good idea but lots of core functions nowadays aren't tested with the tutorial theme in xml mode.

The header looks like <?xml .... and is in themes/tutorial/template/Page.ss

Avatar
ajohri

Community Member, 2 Posts

24 May 2011 at 8:13am

Thanks Will.... Any tips on how to debug? Like a line by line debugger you have in .NET ...etc

I am in learning phase and getting stronger everyday!! :)

Thought of sharing the below site on SilverStripe errors for my other friends who are new like me

http://www.leftandmain.com/silverstripe-tips/2010/09/08/8-common-silverstripe-errors-explained-and-solved/

Avatar
Willr

Forum Moderator, 5513 Posts

24 May 2011 at 11:32am

Well if you want to debug (rather than simply removing the xml header from page which I recommend) then you want to run your site through an HTML validator, you will find it doesn't validate and give you perhaps a better error message but I would assume that a tag may not be closed. Remove parts of Page.ss till it works (don't forget to ?flush=1 while making changes), once you have it working put the bits and pieces back one at a time till you determine what causes the issue.