Resolving W3C errors

Is message board greying out your hair (at least what's left of it)? Let us help you here
Locked
Guest

Resolving W3C errors

Post by Guest »

Script URL: http://clubsouthampton.port5.com/mboard/mboard.php
Version of script: latest
Version of PHP: 4
Hosting company: portland
Have you searched THIS FORUM for your problem: yes
(if not please do before posting)
If so, what terms did you try: w3c

Write your message below:

Hello,

I have posted a similiar posting in the gbook section about resolving W3C errors. Please could you inform me as to how l resolve these errors as l would like to enter my site in for an award and in order to do so it needs to be W3C compliant.
These are the errors:

#

Line 23, column 14: start tag for "LI" omitted, but its declaration does not permit this

<!--s 430--><p><li><a href="msg/430.html">xmas meal</a> - <b>Justin</b> <i>22/Ju


#

Line 27, column 14: document type does not allow element "P" here; assuming missing "LI" start-tag

<!--s 429--><p><li><a href="msg/429.html">ideas September to December please ad


#

Line 39, column 14: document type does not allow element "P" here; assuming missing "LI" start-tag

<!--s 422--><p><li><a href="msg/422.html">celbrations thoughout August</a> - <b>


#

Line 43, column 14: document type does not allow element "P" here; assuming missing "LI" start-tag

<!--s 418--><p><li><a href="msg/418.html">canal weekend</a> - <b>Dan</b> <i>18/J


#

Line 47, column 14: document type does not allow element "P" here; assuming missing "LI" start-tag

<!--s 417--><p><li><a href="msg/417.html">grease Thursday 11th</a> - <b>Dan</b>


#

Line 51, column 14: document type does not allow element "P" here; assuming missing "LI" start-tag

<!--s 416--><p><li><a href="msg/416.html">Chapel @ salisbury</a> - <b>Steve Awes


#

Line 59, column 14: document type does not allow element "P" here; assuming missing "LI" start-tag

<!--s 396--><p><li><a href="msg/396.html">linedancer</a> - <b>Ruby Dancingmoon</


#

Line 62, column 4: end tag for element "LI" which is not open

</li><!--k 288-->

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occured in a script section of your document, you should probably read this FAQ entry.


#

Line 63, column 4: end tag for element "LI" which is not open

</li><!--k 280-->


#

Line 64, column 4: end tag for element "LI" which is not open

</li><!--k 242-->


#

Line 65, column 4: end tag for element "LI" which is not open

</li><!--k 238-->


#

Line 66, column 4: end tag for element "LI" which is not open

</li><!--k 211-->


#

Line 67, column 13: character data is not allowed here

<!--o 218--> (0)

You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>) or forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes).


#

Line 68, column 4: end tag for element "LI" which is not open

</li><!--k 190-->


#

Line 70, column 4: end tag for element "LI" which is not open

</li><!--k 181-->


#

Line 71, column 4: end tag for element "LI" which is not open

</li><!--k 175-->


#

Line 72, column 4: end tag for element "LI" which is not open

</li><!--k 103-->


#

Line 73, column 4: end tag for element "LI" which is not open

</li><!--k 56-->


#

Line 74, column 4: end tag for element "LI" which is not open

</li><!--k 25-->


#

Line 76, column 4: end tag for element "LI" which is not open

</li><!--k 4-->


#

Line 77, column 4: end tag for element "LI" which is not open

</li><!--k 2-->


#

Line 78, column 4: end tag for element "LI" which is not open

</li><!--k 1-->


#

Line 88, column 43: there is no attribute "NAME"

<form method=post action="mboard.php" name="form">

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

This reaction is a little late but I think the answer can help others who experience the same problem.

The error is in the mboard.php script.

In line 426:
$addline .= "<!--s $count--><p><li><a href=\"msg/$count.$settings[extension]\">$subject</a> - <b>$name</b> <i>$date</i>$settings[newline]";
there is a tag nesting error, the <p> and <li> tags must be switched, the correct line is:
$addline .= "<!--s $count--><li><p><a href=\"msg/$count.$settings[extension]\">$subject</a> - <b>$name</b> <i>$date</i>$settings[newline]";

To validate furter two more things must be changed:
In line 102:
<form method=post action="mboard.php" name="form">
The name attribute may not be used in html 4.0 in the form tag. It should be changed to id. The correct line is:
<form method=post action="mboard.php" id="form">

As last thing the character encoding line should be changed. Search for the line:
<meta content=\"text/html; charset=windows-1250\">
(find it in lines 259 and 627) and change it to:
<meta http-equiv=\"content-type\" content=\"text/html; charset=windows-1250\">

I don't use this script myself so I haven't looked for errors in other pages than the main page. But this should give you a start.
Locked