Jump to:

3435 Posts in 1026 Topics by 866 members

Template Questions

SilverStripe Forums » Template Questions » draft site ok but published site not working

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

Page: 1
Go to End
Author Topic: 1299 Views
  • servalman
    Avatar
    Community Member
    211 Posts

    draft site ok but published site not working Link to this post

    Hello

    I'm curently working on the basic tutorial .
    I'm at the step "Adding a second level"

    I did what was written and this is how my Page.ss looks like :(the Page.ss code is below)

    The weird thing is that if I click on draft site the web site looks ok with submenus but if I try to see published site I get :

    Erreur d'analyse XML : balise ne correspondant pas. Attendu : </ul>.
    Emplacement : http://www.possibles.net/silvtest/what-we-do/?stage=Live
    Numéro de ligne 59, Colonne 6 :         </div>
    --------------------------^

    it is in french bur it means that the awaited tag is wrong it should be </ul> but it reads </div>

    any idea (i'm workin on firefox 3)

    Thanks

    ----------- Page.ss code
    <?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 %>
          $MetaTags

       </head>
       <body>
          <div id="Main">
          <ul id="Menu1">
    <% control Menu(1) %>
    <li class="$LinkingMode"><a href="$Link" title="Go to the &quot;{$Title}&quot; page">$MenuTitle</a></li>
    <% end_control %>
    </ul>
             <div id="Header">
                <h1>$Title</h1>
             </div>
             <div id="ContentContainer">
             <% if Menu(2) %>
             <ul id="Menu2">

    <% control Menu(2) %>
    <li class="$LinkingMode"><a href="$Link" title="Go to the &quot;{$Title}&quot; page">$MenuTitle</a></li>
    <% end_control %>
    </ul>
    <% end_if %>
                <div id="Content" class="typography">
                   $Content
                   $Form
                </div>
             </div>
             <div id="Footer">
                <span>Visit <a href="http://www.silverstripe.com" title="Visit www.silverstripe.com">www.silverstripe.com</a>; to download the CMS</span>
             </div>
          </div>
          $SilverStripeNavigator
       </body>
    </html>

  • silberfischer
    Avatar
    Community Member
    6 Posts

    Re: draft site ok but published site not working Link to this post

    This could be caused by the first line in the .ss file:
    <?xml version="1.0" encoding="UTF-8"?>

    This demands more rigid coding for a page to be valid.
    In the case you mentioned you have to add closing </ul> tags (and I guess a couple of other errors will pop up after that).

    Basically you have two choices:
    1. (Lazy) remove the first line
    2. (Robust, probably better in the long run) learn about the requirements to produce XHTML (e.g. http://fr.selfhtml.org/html/xhtml/index.htm)

    Hope this helps,
    Chris

    1299 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.