• Error 1: Line 231, column 58: document type does not allow element “form” here; assuming missing “li” start-tag

    <form method=”get” id=”searchform” action=”/index.php”>

    Error 2: Line 232, column 27: there is no attribute “onClick”

    <input type=”text” onClick=”if(this.value==’Search and Enter’) this.value=”;” v

    Error 3: Line 232, column 137: end tag for “li” omitted, but OMITTAG NO was specified

    …er” name=”s” id=”s” /></form>

    Error 4: Line 231, column 4: start tag was here

    <form method=”get” id=”searchform” action=”/index.php”>

    I’ve checked and doublechecked the code in sidebar.php, but to no avail. Code is pretty much the same as the kubrick default sidebar so what gives?

    https://www.blog.lswon.com

    Any help is appreciated

Viewing 9 replies - 1 through 9 (of 9 total)
  • You’re missing the start <code><li> tag in the form input line. Change the search block to:

    <li><h2>Search this Site</h2>
    <ul>
    <li><form method="get" id="searchform" action="/index.php"><input type="text" onClick="if(this.value=='Search and Enter') this.value='';" value="Search and Enter" name="s" id="s" /></form></li>
    </ul>
    </li>

    Thread Starter lswon

    (@lswon)

    The code looks like this:

    • <h2>Search this Site</h2>
      <?php include (TEMPLATEPATH . ‘/searchform.php’); ?>

    Isn’t this correct?

    Aah. Oh yeah, I forgot kubrick has the form in a separate file.

    You can either edit the searchform.php file, or just drop the include to the searchform, and just use the code I posted above. Either way, it should validate.

    Like I said, you just gotta find the missing <li>

    Thread Starter lswon

    (@lswon)

    I just checked my sidebar.php and I have no missing

    • tags anywhere.

    You have.
    <li><h2>Search this Site</h2>
    <ul>
    <form method="get" id="searchform" action="/index.php">
    <input type="text" onClick="if(this.value=='Search and Enter') this.value='';" value="Search and Enter" name="s" id="s" /></form>

    The form cannot be in <ul> so after it you need a <li>, which has to be closed after the </form> like
    </li>
    </ul>

    And after that comes the closing for the <li> started before the h2 Search…

    Thread Starter lswon

    (@lswon)

    moshu, thanks for the help. I removed the

    tags and reduced the errors from 4 to 1. Can’t figure out this last problem.

    This is what my sidebar.php file looks like:

    Sidebar.php

    I think script attributes are case-sensitive, so you might try changing “onClick” to “onclick”. What I mean is that they work fine in upper or lower case, but need to be lower case to properly validate. Why? I’m not sure.

    Thread Starter lswon

    (@lswon)

    brainwidth, thank you very much for the easy fix ??

    No problem. ?? I spent half the day yesterday squashing my own validation errors, so I know how frustrating it can be.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Why is my Sidebar not validating?’ is closed to new replies.