Version 22.0220 Reports Error; Can't Find Error

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
paulp575
Rank IV - Intermediate
Rank IV - Intermediate
Posts: 136
Joined: Tue Aug 09, 2005 1:20 pm
Location: Spokane WA
Contact:

Version 22.0220 Reports Error; Can't Find Error

Post by paulp575 »

Using version 22.0220 and when I do a check using F6 it's report an error on line 350:
The <table> element must have an end tag (</table>) but the end tag was not found, is misplaced, misspelled, or was not seen due to other errors.
Line 350 shows it's there.

Then it reports on line 16704:
The end tag for <table> (started in line 350, column 20) should appear before this </td> end tag or this end tag should be deleted or moved. This is a nesting error.
Line 16704 shows it's there.

I've spent the last couple hours searching for a nesting error without success.

Any suggestions?
Attachments
trains-modern.zip
(115.5 KiB) Downloaded 3 times
paulp575
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3649
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Version 22.0220 Reports Error; Can't Find Error

Post by Albert Wiersch »

Hello,

I took a quick look but this is going to take a bit longer to investigate. I'll work on this tomorrow (Friday). Thanks.
paulp575
Rank IV - Intermediate
Rank IV - Intermediate
Posts: 136
Joined: Tue Aug 09, 2005 1:20 pm
Location: Spokane WA
Contact:

Re: Version 22.0220 Reports Error; Can't Find Error

Post by paulp575 »

Yes, It's long.
No rush.
if you need to check it from the online copy, here's the link: http://www.dog-walker.org/trains-modern.htm
paulp575
paulp575
Rank IV - Intermediate
Rank IV - Intermediate
Posts: 136
Joined: Tue Aug 09, 2005 1:20 pm
Location: Spokane WA
Contact:

Re: Version 22.0220 Reports Error; Can't Find Error

Post by paulp575 »

I thought maybe the "Structure" tab would help by copying and pasting into an ASCII text document and slowly start by eliminating items inside rows and tables until I found the mismatch.

Nope; "Structure" can't be copies and pasted.

Maybe a future update to allow copying and pasting the structure?
paulp575
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3649
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Version 22.0220 Reports Error; Can't Find Error

Post by Albert Wiersch »

paulp575 wrote: Fri Jun 10, 2022 12:30 am I thought maybe the "Structure" tab would help by copying and pasting into an ASCII text document and slowly start by eliminating items inside rows and tables until I found the mismatch.

Nope; "Structure" can't be copies and pasted.

Maybe a future update to allow copying and pasting the structure?
You can copy and paste it but it's a little tricky because clicking in the Structure window usually places focus in the main editor (unless you click on a line for an implied tag), but you can right-click and choose 'Select All' then right-click and choose 'Copy'.
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3649
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Version 22.0220 Reports Error; Can't Find Error

Post by Albert Wiersch »

Well, I stayed up late and worked on this. :D

First, investigating this lead me to a bug that let some invalid elements get used in <th> (like <article> and <section>), so that should be fixed in the next update.

Second, all you should have to do is add another </table> tag. It looks like there is a </table> tag there already, but there's another table that needs to be ended as well (2 tables each needing a </table>).

So after doing that and changing all the <th> elements to <td> (because <article> and <section> is not valid in <th>), it now validates in CSS HTML Validator and at https://validator.w3.org/nu/ . Of course you may not want to do this (changing all <th>s to <td>s but I just did it for testing/validation purposes).
paulp575
Rank IV - Intermediate
Rank IV - Intermediate
Posts: 136
Joined: Tue Aug 09, 2005 1:20 pm
Location: Spokane WA
Contact:

Re: Version 22.0220 Reports Error; Can't Find Error

Post by paulp575 »

I would that that it doesn't matter if there are <th> or <td> as long as each has a closing tag.

Now the question is where should that missing </table> tag go?
paulp575
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3649
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Version 22.0220 Reports Error; Can't Find Error

Post by Albert Wiersch »

paulp575 wrote: Fri Jun 10, 2022 10:49 am I would that that it doesn't matter if there are <th> or <td> as long as each has a closing tag.

Now the question is where should that missing </table> tag go?
Placing it right after the already-existing </table> tag on line 16703 does the trick.
paulp575
Rank IV - Intermediate
Rank IV - Intermediate
Posts: 136
Joined: Tue Aug 09, 2005 1:20 pm
Location: Spokane WA
Contact:

Re: Version 22.0220 Reports Error; Can't Find Error

Post by paulp575 »

Okay, that took care of the problem.
But to me that indicates there's something else wrong with the file structure - i.e., having 2 </table> tags next to each other. Seems as though there should be a end cell and end row between those 2 tags.
paulp575
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3649
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Version 22.0220 Reports Error; Can't Find Error

Post by Albert Wiersch »

paulp575 wrote: Fri Jun 10, 2022 12:58 pm Okay, that took care of the problem.
But to me that indicates there's something else wrong with the file structure - i.e., having 2 </table> tags next to each other. Seems as though there should be a end cell and end row between those 2 tags.
If you look at the structure, the end table tags implicitly end elements like <tbody>, <th>, <td>, and <tr>.

In your case, instead of </table></table> on line 16703, you could add some explicit end tags using </tbody></table></th></tr></tbody></table> or just </table></th></tr></table> (if you leave out the </tbody> tags).
paulp575
Rank IV - Intermediate
Rank IV - Intermediate
Posts: 136
Joined: Tue Aug 09, 2005 1:20 pm
Location: Spokane WA
Contact:

Re: Version 22.0220 Reports Error; Can't Find Error

Post by paulp575 »

Found the problem!

If you search the file for Route 66 you'll see a missing </th>, </tr>, and </table> tags as the closing for that table.

So the next update will remove <article> and <section> tags from within a table? If so, then I guess I'm back to using the <div> or <p> tags.
paulp575
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3649
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Version 22.0220 Reports Error; Can't Find Error

Post by Albert Wiersch »

paulp575 wrote: Sat Jun 11, 2022 9:34 pm Found the problem!

If you search the file for Route 66 you'll see a missing </th>, </tr>, and </table> tags as the closing for that table.
Great! I think I see what you are referring to.
paulp575 wrote: Sat Jun 11, 2022 9:34 pmSo the next update will remove <article> and <section> tags from within a table? If so, then I guess I'm back to using the <div> or <p> tags.
Only if it is in a <th> (table header) element. It's OK in <td>.

The HTML5 specification says for <th> that <th> can contain: Flow content, but with no header, footer, sectioning content, or heading content descendants.

Here is more information about <th>:
https://html.spec.whatwg.org/multipage/ ... th-element

A <td> element does not have the "no header, footer, sectioning content, or heading content descendants" limitation.

I hope this helps!
paulp575
Rank IV - Intermediate
Rank IV - Intermediate
Posts: 136
Joined: Tue Aug 09, 2005 1:20 pm
Location: Spokane WA
Contact:

Re: Version 22.0220 Reports Error; Can't Find Error

Post by paulp575 »

Did you notice the missing tags were contained in a comment section surrounded by <!-- and --> tags?

Maybe figure out a way to check for those tags within comments? Otherwise it could drive a web designer crazy! It did me until I found it.
paulp575
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3649
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Version 22.0220 Reports Error; Can't Find Error

Post by Albert Wiersch »

No, I do not see the missing tags in a comment section. I searched for 'Route 66' and found it on line 12856. I saw the <table> tag on line 12860. I scrolled down a little and saw some commented out HTML. From the indentation, it looks like the end tags should go on line 12893 but I am not familiar with your table. It's way too big for my human brain. :D

Unfortunately I am not sure how CSS HTML Validator could generate better error messages about issues like this.

If you ever have time then I think you should find a way to remove the table. Tables are really only for tabular data... but it seems like it would be a lot of work unless you could automate it somehow. It's also a very large web page so if you ever re-design it then breaking it up into smaller pages might be a good idea too.

I did like my electric train as a kid in the 80s though! I would go to the local mall and buy a lot of accessories for it at the little toy store there... but the mall and toy store are long gone now.
paulp575
Rank IV - Intermediate
Rank IV - Intermediate
Posts: 136
Joined: Tue Aug 09, 2005 1:20 pm
Location: Spokane WA
Contact:

Re: Version 22.0220 Reports Error; Can't Find Error

Post by paulp575 »

I appreciate your comments on eliminating the tables, but not sure what to replace them with.
Unfortunately there's plenty about HTML - especially HTML5 - that I don't understand so I use what I'm familiar with.
As long as it passes checking by HTML Validator, I'm satisfied it will display fine.

As for model trains, I used to have some between 1956 and 1966 but after leaving home for the USAF I eventually sold them.
I got started back into them in 2009 when Lionel was licensed to issue some items honoring BSA's 100th anniversary. And then like some other hobbies, it blossomed into a major hobby.
paulp575
Post Reply