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.

Content Editor Discussions

Forum for content editors and CMS users.

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

Content appearing in sidebar and not on main page


Reply

5 Posts   1944 Views

Avatar
jwsgoldsilver

8 January 2009 at 5:08pm Community Member, 3 Posts

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>.
Location: http://www.jwsgoldsilver.com/
Line 73, Column5:

</div>
--------------------------^

Any ideas? How does one edit the silverstripe code dwon to the level required to fix this?

Avatar
Willr

8 January 2009 at 7:39pm Forum Moderator, 5511 Posts

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)

Avatar
jwsgoldsilver

8 January 2009 at 8:52pm Community Member, 3 Posts

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.

Avatar
Carbon Crayon

8 January 2009 at 10:48pm (Last edited: 8 January 2009 10:54pm), Community Member, 598 Posts

Hi jwsgoldsilver

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" >
                     
         <div class="sidebox">   

         <p><a href="http://www.jwspaidtosave.com/gold-silver/">Sign up here to Joseph Wealth Systems</a></p>
         
            <h1>Gold is Money</h1>
            <p></p>

       <div class="sidebox">   <!--   **** REMOVE THIS LINE **** -->
            <h1>Wise Words</h1>
            <p></p>               
            <p class="align-right"></p>
               
         </div>      
         

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.

Avatar
jwsgoldsilver

10 January 2009 at 10:48am Community Member, 3 Posts

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.