Jump to content

Getting validation errors, Need help or ideas to fix!


Guest eric47905

Recommended Posts

Guest eric47905

Ok, on my site http://www.xincense.com I am getting 22 validation errors when checked on http://validator.w3.org/

It was over 200 errors, which was some sloppy coding on my part, but I have fixed everything I could and now it is down to things beyond me.

8 of these errors derive from a disable right click script, which I will email the author on, no biggie...

But the rest entail things like this:

--------------------------------------------------------------------

Line 59, Column 27: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.

<div class="boxContentLeft">

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

---------------------------------------------------------------------

I have searched from top to bottom each piece of the boxes that I made and the tpl and etc... but I cannot find these missing tags, or that they are in another tag like it says. It seems to be all of the <div> tags for the side boxes causing the errors, but why or where?????

Basically I am going crazy trying to find this.

Please HELP!! :errm:

Link to comment
Share on other sites

You've not made it easy for people to help you.

You've disabled the right-mouse button with some Javascript.

However, it is trival to by-pass (so therefore not worth using...).

Ok, the main problem (apart from the Javascript validation), is the <p> tags before the <div>

I hope this helps,

Jason

Link to comment
Share on other sites

Guest eric47905

Thanks guys, that was it mainly, the <p> tags....And I took off the right click disable, because not only could I detect your detest of it, but I read a bunch of posts in other places on the web about how all it does is tick off your customers, and yes it is easily bypassed by people who know to just click view source :errm:

So I took that off and deleted the paragraph tags, and it leaves only one validation error, WHOOHOO!

Any idea as to why it says this last one

---------------------------------

Line 356, Column 5: end tag for "tr" which is not finished.

</tr></table>✉

Most likely, You nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.

---------------------------------

Thanks for your help!

Link to comment
Share on other sites

Guest offthehook

Thanks guys, that was it mainly, the <p> tags....And I took off the right click disable, because not only could I detect your detest of it, but I read a bunch of posts in other places on the web about how all it does is tick off your customers, and yes it is easily bypassed by people who know to just click view source :errm:

So I took that off and deleted the paragraph tags, and it leaves only one validation error, WHOOHOO!

Any idea as to why it says this last one

---------------------------------

Line 356, Column 5: end tag for "tr" which is not finished.

</tr></table>✉

Most likely, You nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.

---------------------------------

Thanks for your help!

I guess it is this:

<tr>

 </tr>

Which is a table row without any table cells inside it.

By the way you need to now look at the other pages in your site as you have similar validation errors throughout. You cannot simply validate your homepage and assume that the entire site is fine. (you may know this of course.. but at least for those who don't, then they do now)

Link to comment
Share on other sites

Hi Eric,

Sorry about the harsh opinion re:Right Click Disable - glad to see its gone though :-)

Ok, the final validation error is an empty <tr></tr> which is on line 380/831 ish I'm not too sure where its coming from, so if its needed, change to:

<tr>&nbsp;</tr>

Well, hopefully that should sort it out. I'd a damm nice site you got there!

Jason

Link to comment
Share on other sites

Guest eric47905

I guess it is this:

<tr>

 </tr>

Which is a table row without any table cells inside it.

By the way you need to now look at the other pages in your site as you have similar validation errors throughout. You cannot simply validate your homepage and assume that the entire site is fine. (you may know this of course.. but at least for those who don't, then they do now)

Doh, for some reason I was glancing over a blank row there....guess sitting at the comp for several straight hours makes you less than tack sharp.

Any ideas on how to locate it to clear it out now? I looked in the index.tpl, the content/index.tpl, the index.inc.php, and am basically lost. I cant find the spot that is generating that table row open and close tag back to back like that. Any ideas on where to start looking? It appears to follow the latest products, after the three rows of them it shows up there. I just did a fix by goober posted here in the .com forum to space out the latest products correctly, but I checked where that was done and I dont see where it would be calling up an extra row either.

As for fixing other pages...Ya i know, I just wanted to get the homepage fixed first so that I know what to look for on the other pages or areas. Mainly it is gonna be my index.tpl and the cart.tpl causing the errors, but now if i can find this, the index.tpl will be error free, and then on to the rest.

Thanks everyone for your help and fast responses!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...