Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

inane invalidation; its killing me

Options
  • 25-10-2004 9:39pm
    #1
    Registered Users Posts: 1,169 ✭✭✭


    Hi, I've been staring at my site for the last two days and just can't find the 1 error that's causing it to be rejected as valid:

    http://validator.w3.org/check?uri=http%3A%2F%2Ftcal.net%2Findex.php

    It's been completely valid before, but I recently updated the permalink structure/made a few changes to layout etc. and it was producing 5 to 6 errors but i've got rid of them all down to 1:
    Line 358, column 5: end tag for element "li" which is not open

    </li>

    The Validator found an end tag for the above element, but that element is not currently open....

    What's upsetting me is I just cannot for the life of me find the </li> that's causing the trouble. (or the <li>)

    here's the code snippet:

    [PHP]<ul>

    <li id="categories"><?php _e('Categories:'); ?>
    <ul>
    <?php wp_list_cats(); ?>
    </ul>
    </li>



    <li id="search">
    <label for="s"><?php _e('Search TCAL:'); ?></label>
    <form id="searchform" method="get" action="<?php echo $PHP_SELF; ?>">
    <input type="text" name="s" id="s" size="12"/> <input type="submit" name="submit" value="<?php _e('Go'); ?>" />

    </form>
    </li>


    <li id="archives"><?php _e('Archives:'); ?>
    <ul>
    <?php wp_get_archives('type=monthly'); ?>
    </ul>

    </li>

    </ul>[/PHP]

    What I'm really hoping is someone will just see the problem straight away. I bet it's something really obvious but I'm just too dumb to see it. If anyone has any tips on troubleshooting niggly little errors like this i'd be most appreciative.


Comments

  • Registered Users Posts: 1,038 ✭✭✭rob1891


    Not a html person by any means but to me it looks like it's got to be something in the php calls, so you need to check out what they generate?


  • Registered Users Posts: 1,038 ✭✭✭rob1891


    According to the validator the error isn't near where the code you posted, it is at line 358 ...
    324: 
    325:  <li id="archives">Archives:	 	<ul>
    326: 		 	<li><a href="http://tcal.net/archives/2004/10/" title="October 2004">October 2004</a></li>
    327: 	<li><a href="http://tcal.net/archives/2004/09/" title="September 2004">September 2004</a></li>
    328: 	 	</ul>
    329: 
    330: </li>
    331: 
    332: </ul>
    333: 
    334:  </td>
    335: 
    336:  <td valign="top"><table border="0" cellpadding="1" cellspacing="0" bgcolor="EBE8C3">
    337:   <tr>
    338:     <td align="right"><ul><li>Features:</li>
    339:      <li><a href="http://tcal.net/archives/2004/10/24/tcal-labs/"><img src="http://tcal.net/images/tcallabsbutton.jpg" width="86" height="49" border="0" alt="TCAL Labs"/></a></li>
    340: 
    341:     <li><a href="http://tcal.net/archives/2004/09/12/artballs/"><img src="http://tcal.net/images/artballs.gif" width="86" height="49" border="0" alt="artballs"/></a></li>
    342:     <li><a href="http://tcal.net/archives/2004/09/12/the-internet-file-sharing-and-the-darknet/"><img src="http://tcal.net/images/darknet.gif" width="86" height="49" border="0" alt="darknet"/></a></li>
    343: 
    344: 
    345:      <li id="meta">Meta:	    	<ul>
    346: 	   		<li><a href="http://tcal.net/feed/rss2/" title="Syndicate this site using RSS"><abbr title="Really Simple Syndication">RSS</abbr> 2.0</a></li>
    347: 	   		<li><a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li>
    348: 	   		<li><a href="http://wordpress.org/" title="Powered by WordPress; state-of-the-art semantic personal publishing platform.">WP</a></li>
    349: 	   	</ul>
    350: 	  </li>
    351: 
    352: </ul>
    353: 
    354: 
    355: 
    356: 
    357: 
    358:  </li>
    

    Now from the code you posted it looks like you are enclosing sections with <li id=archives> or whatnot. In this case however you close the 'features' section and don't id it in the same way. <li>features</li> where before you'd use <li id=features> ....... lots of code ........ </li>

    So I am hazarding a guess that you have gotten mixed up and have a closing li tag for both styles!

    Rob


  • Registered Users Posts: 1,169 ✭✭✭dangerman


    Rob is a superhero.

    Everyone say it with me. You legend.

    You were right.

    Do you want to know where the problem was occuring?

    I'm a retard, when I was looking at the 358 number in textpad, I'd pasted it in wrongly, so I was looking at line 300 or whatever. No wonder I couldn't spot the bloody error. I knew it was something tard-like like this. :D


Advertisement