502 Posts in 183 Topics by 251 members
|Go to End|
8 January 2009 at 5:08pm
My site: www.jwsgoldsilver.com
Without me doing anything, my main content is now appearing in the right hand sidebar. This is the error I get on Mozilla when I load the page:
XML parsing error: mismatched tag. Expected: </p>.
Line 73, Column5:
Any ideas? How does one edit the silverstripe code dwon to the level required to fix this?
8 January 2009 at 7:39pm
It looks like your html is being sent as strict XML and you are missing a </p> tag. So 2 ways to solve this. Add the </p> in your template where you are missing it (i haven't looked as to where) or remove the <? xml ?> header from you Page.ss file in the themes/yoursitetheme/templates/ folder (it should be the top line)
8 January 2009 at 8:52pm
Thanks. I deleted the xml tag on the page.ss and the error disappears from Mozilla. However, the main content frame is still empty and the content is in the side bar. The main content should begin with "Buy gold to protect your wealth..." and continues to "Regards, Andrew Smith". Bit of a puzzle as to why this is in the sidebar.
8 January 2009 at 10:48pm Last edited: 8 January 2009 10:54pm
Its because you have 2 sidebox divs and you have not closed one of them before opening the main div. Really you should only have one. So you need to remove this one:
<div id="sidebar" >
<p><a href="http://www.jwspaidtosave.com/gold-silver/">Sign up here to Joseph Wealth Systems</a></p>
<h1>Gold is Money</h1>
<div class="sidebox"> <!-- **** REMOVE THIS LINE **** -->
You general page structure is quite messy, you have way more divs than you need. I find the blackcandy template is a good place to start as it has very nicely structured html and will make sure you avoid issues like this
I would also recommend the firefox developer toolbar or firebug as they allow you to analyse the structure of your page and debug problems like this. You could also use a text editor like aptana (or even dreamweaver...*shudder* ) which will highlight corresponding tags, so you can find which tags do not close.
10 January 2009 at 10:48am
Thanks Aram. Very helpful.
It appears I was missing a </div> at the end of the file. I will use your recommendations in the future to find faulty code. Also a folder called silverstripe_cache was not around. Don't know how that wasn't there in the first place. All good now and thanks all for being so helpful.
|Go to Top|