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.

Template Questions /

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

draft site ok but published site not working


Go to End
Reply


2 Posts   1430 Views

Avatar
servalman

Community Member, 211 Posts

6 February 2009 at 6:30am

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

Avatar
silberfischer

Community Member, 6 Posts

7 February 2009 at 2:28am

Edited: 07/02/2009 2:29am

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