View Full Version : validation using w3.org help!
tipoboy
03-15-2009, 08:51 PM
hi there folks i need a bit of help validating my site
i started off with over 300 errors and have got it down to 46.
the next error i need to deal with relates to my forumhome_forumbit_level1_nopost template, which is
<!-- top -->
<table class="forumbit1" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="cattitle" width="35" valign="top"><img src="$stylevar/cattitle_left.gif" width="35" height="47" alt=" " /></td>
<td class="cattitle" width="85%">
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['forumdescription']">: <span class="smallfont">$forum[description]</span></if>
</td>
<td class="cattitle" valign="top">
<div align="right">
<img src="$stylevar[imgdir_misc]/cattitle_right.gif" width="35" height="47" alt=" " />
</div></td>
</tr>
<tr>
<td colspan="3">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="95%" align="center">
<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
<tr align="center">
<td class="thead" width="5%"> </td>
<td class="thead" width="45%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead"> </td>
<td class="thead" width="30%">$vbphrase[last_post]</td>
<td class="thead" width="10%">$vbphrase[threads]</td>
<td class="thead" width="10%">$vbphrase[posts]</td>
<if condition="$vboptions[showmoderatorcolumn]">
<td class="thead">$vbphrase[moderator]</td>
</if>
</tr>
$childforumbits
</if>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="catfooter"><img src="$stylevar[imgdir_misc]/catfooter_left.gif" alt=" " /></td>
<td class="catfooter"> </td>
<td class="catfooter"><div align="right"><img src="$stylevar[imgdir_misc]/catfooter_right.gif" alt=" " /></div></td>
</tr>
</table>
<!-- /top -->
<!--div style="padding: 5px 5px 5px 5px;"></div-->
the error i need to sort out is
[I]Line 249 (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.scottishwheelnuts.co.uk %2Ftestvb%2Fforum.php&charset=%28detect+automatically%29&doctype=Inline&ss=1&outline=1&group=0&No200=1&verbose=1&user-agent=W3C_Validator%2F1.606#line-249), Column 80: document type does not allow element "table" here .
?r="0" cellpadding="0" cellspacing="0">The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
any help here would be grately appreciated
Lynne
03-15-2009, 10:09 PM
Your tags aren't nested properly. You went:
<table>
<if>
<tbody>
....
</if>
</tbody>
</table>
tipoboy
03-15-2009, 10:20 PM
thanks for the reply lynne
i changed the code so the elements were nested correctly and it didnt seem to change anything still stuck on 49 errors
could you or anyone else offer any more assistance the forumhome_forumbit_level1_nopost template is now
<!-- top -->
<table class="forumbit1" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="cattitle" width="35" valign="top"><img src="$stylevar[imgdir_misc]/cattitle_left.gif" width="35" height="47" alt=" " /></td>
<td class="cattitle" width="85%">
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['forumdescription']">: <span class="smallfont">$forum[description]</span></if>
</td>
<td class="cattitle" valign="top">
<div align="right">
<img src="$stylevar[imgdir_misc]/cattitle_right.gif" width="35" height="47" alt=" " />
</div></td>
</tr>
<tr>
<td colspan="3">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="95%" align="center">
<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
<tr align="center">
<td class="thead" width="5%"> </td>
<td class="thead" width="45%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead"> </td>
<td class="thead" width="30%">$vbphrase[last_post]</td>
<td class="thead" width="10%">$vbphrase[threads]</td>
<td class="thead" width="10%">$vbphrase[posts]</td>
<if condition="$vboptions[showmoderatorcolumn]">
<td class="thead">$vbphrase[moderator]</td>
</if>
</tr>
$childforumbits
</tbody>
</if>
</table>
</td>
</tr>
<tr>
<td class="catfooter"><img src="$stylevar[imgdir_misc]/catfooter_left.gif" alt=" " /></td>
<td class="catfooter"> </td>
<td class="catfooter"><div align="right"><img src="$stylevar[imgdir_misc]/catfooter_right.gif" alt=" " /></div></td>
</tr>
</table>
<!-- /top -->
Lynne
03-15-2009, 10:27 PM
Actually, you will get an error if that if statement evals to false (just ask Dieselminded - he's got an error just like that on a different page). You should put the if statement outside of the table. The thing is, you can't have:
<table>
</table>
You need to have at least:
<table>
<tr>
<td>
</td>
</tr>
</table>
tipoboy
03-15-2009, 11:20 PM
Actually, you will get an error if that if statement evals to false (just ask Dieselminded - he's got an error just like that on a different page). You should put the if statement outside of the table. The thing is, you can't have:
<table>
</table>
You need to have at least:
<table>
<tr>
<td>
</td>
</tr>
</table>
why oh why did i start this validation business lol
i'm sorry lynne i dont follow, i've tried a few different methods and i cant seem to get it sorted, could i trouble you to post using the code i've added what you think will get it throught the validation so i can see what i'm doing wrong??
thanks again for your help :)
Lynne
03-15-2009, 11:25 PM
I've told you... you need to put the <if> tags outside of the <table> tags or it won't validate.
DieselMinded
03-15-2009, 11:38 PM
Listen to Lynne she came in to my site and fixed over 600 errors i worked for 3 hours and had more than i started with
tipoboy
03-15-2009, 11:41 PM
ok i've moved the if conditionals so the code now looks like
<!-- top -->
<table class="forumbit1" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="cattitle" width="35" valign="top"><img src="$stylevar[imgdir_misc]/cattitle_left.gif" width="35" height="47" alt=" " /></td>
<td class="cattitle" width="85%">
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<span class="smallfont">$forum[description]</span>
</td>
<td class="cattitle" valign="top">
<div align="right">
<img src="$stylevar[imgdir_misc]/cattitle_right.gif" width="35" height="47" alt=" " />
</div></td>
</tr>
<tr>
<td colspan="3">
<if condition="$childforumbits">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="95%" align="center">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
<tr align="center">
<td class="thead" width="5%"> </td>
<td class="thead" width="45%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead"> </td>
<td class="thead" width="30%">$vbphrase[last_post]</td>
<td class="thead" width="10%">$vbphrase[threads]</td>
<td class="thead" width="10%">$vbphrase[posts]</td>
<if condition="$vboptions[showmoderatorcolumn]">
<td class="thead">$vbphrase[moderator]</td>
</if>
</tr>
$childforumbits
</tbody>
</table>
</if>
</td>
</tr>
<tr>
<td class="catfooter"><img src="$stylevar[imgdir_misc]/catfooter_left.gif" alt=" " /></td>
<td class="catfooter"> </td>
<td class="catfooter"><div align="right"><img src="$stylevar[imgdir_misc]/catfooter_right.gif" alt=" " /></div></td>
</tr>
</table>
<!-- /top -->
but still the same errors i've highlighted in red the line that the error appertains to
thanks again for the quick replay
Lynne
03-16-2009, 03:13 AM
It's not the table element at all. It's exactly what the error says - the element isn't allowed there. If you look right before the table, you'll see you closed a row:
</tr> <!-- / guest welcome message -->
<!-- top -->
<table class="forumbit1" width="100%" border="0" cellpadding="0" cellspacing="0">
Things in a table may only go between <td> tags. Somewhere along the way, you either dropped the next row tags or else you forgot to close the table.
Princeton
03-16-2009, 12:32 PM
check SHOWTHREAD to fix above issue
---------
TIPS
close all your <images> properly
<img src="/streetrod/misc/cattitle_left.gif" width="35" height="47">should be
<img src="/streetrod/misc/cattitle_left.gif" width="35" height="47" />(pay attention to the closing brackets)
do not use
background="/streetrod/misc/footer_top.gif"use
style="background: transparent url(/streetrod/misc/footer_top.gif)do not use <center>, <font>
snakes1100
03-16-2009, 12:37 PM
check SHOWTHREAD to fix above issue
---------
TIPS
<img src="/streetrod/misc/cattitle_left.gif" width="35" height="47" />
<img src="/streetrod/misc/cattitle_left.gif" width="35" height="47" alt="" />
alt tags are required.
tipoboy
03-16-2009, 03:17 PM
thanks for all the help folks thats my forumhome page validated now to start with the others, more than likely i'll be back later to ask a few more questions
tipoboy
03-17-2009, 10:16 PM
howdy again...
i've got an error on my memberslist and calendar pages relating to a side column i have which at the end of the footer template i have:
<!-- side column -->
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="sidecolumn">
<table border="0" width="100%" align="left" cellspacing="1" cellpadding="1">
$forumhome_sidecolumn_left
</table>
</td>
<td width="2px"></td>
<td class="maincontent">
<!-- / side column -->
and ending at the begining of my footer
<!-- side column -->
</td>
</tr>
</table>
<!-- / side column -->
now i get 12 errors and after several hours searching i believe that the spacer_close is abruptly ending my side column and therefor throwing up the errors i have of end tag for element that is not open,
my question is what is the spacer_close and spacer_open for exactly and what effect would it have if i removed the code from them??
thanks for your help so far :)
mcrider
03-17-2009, 10:33 PM
Which error(s) are you referring to, I see several when viewing your site.
tipoboy
03-17-2009, 10:40 PM
thanks for the quick reply
its for my test site right now i've just removed the spacer_open spacer_close from my memberlist template and its now valid xhtml transitional
the test site can be found at www.scottishwheelnuts.co.uk/testvb (http://www.scottishwheelnuts.co.uk/testvb)
what does the spacer_open spacer_close actually do any help is appreciated
Lynne
03-18-2009, 02:10 AM
Per the License Agreement (http://www.vbulletin.com/order/license_agreement.php?member=1), you must password protect your test forum.
tipoboy
03-18-2009, 07:19 AM
Per the License Agreement (http://www.vbulletin.com/order/license_agreement.php?member=1), you must password protect your test forum.
it usually is password protected but while i'm validating it i've disabled the password protect right now, as soon as i get this last problem sorted then i'll enable the password protection again, now back to the question surely someone knows what the spacer_open spacer_close is i've tried searching but cant seem to find an answer
anyone??
mcrider
03-18-2009, 10:56 AM
Sorry had to leave last night....
I never really even looked at the spacer templates before but it looks like they set the width and padding of the style between the header and footer based on the values in your StyleVars and also checks if you are running a very old version of IE.
Hopefully someone can give you a more definitive answer.
<if condition="$show['old_explorer']">
<table cellpadding="0" cellspacing="0" border="0" width="$stylevar[outertablewidth]" align="center"><tr><td class="page" style="padding:0px $stylevar[spacersize]px 0px $stylevar[spacersize]px">
<else />
<div align="center">
<div class="page" style="width:$stylevar[outerdivwidth]; text-align:$stylevar[left]">
<div style="padding:0px $stylevar[spacersize]px 0px $stylevar[spacersize]px" align="$stylevar[left]">
</if>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.