Need help with validating my Menubar php file

hello all…

I recently switched to the new carterlake ajax/php templates and am now trying to sort out the validating of my pages by using the “Valid XHTML 1.0” validator link in the footer section of each of the pages.

to start off with…I first need to get my menubar.php vaild and when first checking I had about 10 error’s…Now I am down to 4 error’s and cant figure out what to do to make them valid. I know some of my other pages have more erros than 4 when trying to validate them, such as my index page, but for now I am just trying to first get the menubar errors sorted out and then at least some of my pages will be 100% valide with no errors, such as my forecast and astronomy pages, amongst other’s.

to first see the errors yourself you can go to my astronomy page and then at bottom click on the XHTML 1.0 Validator link, it will then show you I have 4 error’s, which I know are all within my menubar.php file for this page.

here is the lines 133-162 of my menubar file, and also the error’s I am recieving from validator page:

line 133

Networks

✉ 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 occurred in a script section of your document, you should probably read this FAQ entry.

Line 162, Column 11: end tag for “ul” omitted, but OMITTAG NO was specified.
:email:
You may have neglected to close an element, or perhaps you meant to “self-close” an element, that is, ending it with “/>” instead of “>”.

Line 135, Column 0: start tag was here.

    Line 133, Column 11: XML Parsing Error: Opening and ending tag mismatch: div line 100 and li.
✉ Line 162, Column 12: XML Parsing Error: Opening and ending tag mismatch: ul line 135 and div.

If Anyone can tell me what needs to be edited and where…I would sure apprreciate the help.

Thank you…Chris/gateway2capecod

also wanted to note…I am not using the flyout menu presently or the theme switcher.

also I have included as attachment my complete menubar.php as menubar.php.txt…within this reply…see it below if needed for testing and sorting things out.

thanks again…chris


menubar.php.txt (9.69 KB)

Chris…in the

  • lines what is the significance of #8250?

    Do you have the app ConText?

    If so I can PM you my file and you can see the comparison.

  • Chris,
    I would remove that “” on your line 133 and then try revalidating.

    Chris

    If you format the lines a bit you can easily see the error…

    `

    Information

    [color=red][b][/b][/color]

    Networks

      ... `

      Just as carseman is saying…

    Is the > symbol he has proceeding each link in that section.

    Hello…

    thanks all for the quick replies…

    what I have done was this…removed the extra …reuploaded the menubar.php to server…then got 5 error’s…LOL

    So after that I then added a “” to this: “”

    so it now looks like this:

    reuploaded menubar.php to server again, and now everything inside the menubar.php is Validating 100% Good.

    Now most of my pages are all XHTML 1.0 Valid…with exception of a few that will need some work, such as the index, metar,WDL, Buoy, and a few other of my pages.

    Thanks again…Chris

    hello again…

    one last question…I just check the XHTML Validation for my WU-History page…which is the script from Jim McMURRARY, and on my left side bar the link for it is the page titled “KXIMARWAR2” (Wunderground historical data)…it is showing over 1300 errors???

    was there a newer version of this script released that will get rid of most of the errors or is this gonna be a week long task of fixing them all manually?

    or should I just leave it alone and forget about it…LOL

    …Chris

    1347 errors really has no meaning since the first error can and most likely will cause further parsing errors down the page.

    You fix the first error and then re-validate unless you see that the first error is something that is done repetitively down the page (then you fix all instances of that type of error first).

    First error (Which IS done alot down the page is)

    `Line 404, Column 22: end tag for “b” omitted, but OMITTAG NO was specified.

    73.4 °F`

    Should be…

    <td><b>73.4 &deg;F[color=red][b]</b>[/b][/color]</td>

    hello Kevin…

    It seems after further checking that there was indeed a newer version released of the wu-history.php script, but it is not on Jim’s page…It is on Ken True’s Page, and it is titled “wxwuhistory.zip”…for use with the fairly new carterlake ajax/php templates.

    the link to the wxwuhistory.zip is on Ken true’s page here;

    http://saratoga-weather.org/template/plugins.php

    I am going to download it and see if that eliminates the 1300 validation error’s I am currently recieving because of using my older wuhistory.php file version. I will reply back once completed with an update.

    Thanks…Chris

    Chris,

    There are not really 1300+ errors.

    The parser expects code to be correct… and when it encounters an error, it reports the error. From that point on, you can assume the parser is now out of sync and will report lots of other possible errors that may not really even exist.

    You fix the first error, and then re-validate to see what comes up next. Many times when there is one error, it might show 30+ errors, but when you fix that error, then the code shows clean.

    You have to do it one step at a time…

    Hello Kevin…

    I understnad what you mean above, as I fixed one error in the menubar earlier, when it was reporting 5 error’s…and then after fixing one it eliminated them all, but one…then once I fixed the final one…all were gone.

    in the future I will remember to revalidate each time I fix one error to see how many errors it fixed and are left to fix. It really is time consuming validating all of my webpages, but since it is so darn hot/muggy outside…I decided to stay indoors in the comfy AC and start this project and hopefully everyone of my pages will be 100% valid.

    I finished uploading/installing the new wxwuhistory.php files and rechecked the page…No Error’s reported.

    The WDL and Buoy pages will be another challenge but I see there may be some updated files/plug ins etc. etc. available on Ken’s Site to use when adding these pages to the new template layout… My dashboard will also be a tricky one to get 100% valid, but shouldnt be too hard. For now I have reverted back to a simple dashboard view and will start from there and add my cusomizations of data/Images I want to display one by one and validating/revalidating as I go through the process.

    Thanks again for your assistance…Chris

    WDL Page… is way messed up…

    Missing DocType at the top…

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    

    Has multiple lines etc… One at the top and one where the WDL is added…

    Looks like you have included a script that has its own HTML headers.

    hello kevin…

    well I managed to get the WDL and Buoys page both working correctly now in FF and IE and both are now Validated with No error’s.

    I had to download the newest buoy script from ken’s site and follow through his directions…also found some direction for adding my WDL Page within the templates folder/read me.

    I guess it paid off to do some reading.

    pages are here if you want a peak:

    http://www.gateway2capecod.com/wxlive.php
    http://www.gateway2capecod.com/wxbuoy.php

    I will need to do some editing to the mybuoy-NorthEast.txt file and the Northeast.jpg image, as some of the station names are missing from the list, and also I will most likely delete a few and move a few of the rotating conditions text in better alignment with the data box/hot spots on the map.

    eventually it will look like how I edited johns here:

    http://www.johnsweather.com/buoy/NEWNbuoy.php

    Looks much cleaner and less cluttered this way.

    I also wanted to mention to anyone else reading this that is trying to , or has tried to make their webpages with the new carterlake ajax/php templates all XHTML 1.0 Valid…you may have noticed that the wxabout.php page right from the start when uploaded to your server without any editing done to it before hand is not valid and produces a few error’s when checking it with the validator.

    the solution is to use this code in place of what you have now:

    About This Website

    <p>This site is a template design by <a href="http://www.carterlake.org">CarterLake.org </a> with PHP conversion by <a href="http://saratoga-weather.org/">Saratoga-Weather.org </a>.
     Special thanks go to Kevin Reed at <a href="http://www.tnetweather.com">TNET Weather </a> for his work on the original Carterlake templates, and his design for the common website PHP management.
     Special thanks to Mike Challis of <a href="http://www.carmosaic.com/weather/scripts.php">Carmosaic.com </a> for his wind-rose generator, Theme Switcher and CSS styling help with these templates.
    

    Special thanks go to Ken True of Saratoga-Weather.org for the AJAX conditions display, dashboard and integration of the TNET Weather common PHP site design for this site.

    <p>Template is originally based on <a href="http://capmex.biz/resources/designs-by-haran">Designs by Haran</a>.</p>
    
    <p>This template is XHTML 1.0 compliant. Validate the <a href="http://validator.w3.org/check/referer">XHTML</a> and <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a> of this page.</p>
    

    perhaps ken can update the wxabout.php file within the download package with this code.

    Thanks again…Chris

    Oops… looks like two instances of non-closed BR tags caused all the fuss in wxabout.php (WD-USA)

     ... common website PHP management.
    
    

    should be

     ... common website PHP management.
    
    

    and

     ... styling help with these templates.
    
    

    should be

     ... styling help with these templates.
    
    

    then the page validates.

    I’ll correct the master(s).

    Thanks,
    Ken

    Hello Ken…

    Thanks for updating the download package with the corrected code for the wxabout.php file/page. This will save any new person that downloads the templates and wants them Validated XHTML 1.0…a few headaches.

    I also just tried validating my GRLEVEL3 Page (wxgr3radar.php) and it is giving one pesky error that may also be related to the orginal script, as I have only uploaded the default wxgr3radar.php, and the default GR3-radar-inc.php to my server. go to my grlevel3 page and try validating and you will see the error I am receiveng. My grlevel3 page is here:

    http://www.gateway2capecod.com/wxgr3radar.php

    I also spotted the same 1 error on a nearby station, that I believe also is only using the default wxgr3radar.php and GR3-radar-inc.php files…his page is here:

    http://www.auburnweatherlive.com/wxgr3radar.php

    I believe the problem has something to do within the GR3-radar-inc.php

    Please let me know if you find the fix for this…

    Thank you again…Chris

    one more request…

    My NEWN Mesomap (wxnewnmeso.php) page also has 3 pesky errors, which I believe is one error with something to do with page wrapper…here is the error’s I received when trying to validate:

    Line 1675, Column 7: end tag for element “div” which is not open.

    ✉ 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 occurred in a script section of your document, you should probably read this FAQ entry.

    Line 1675, Column 8: XML Parsing Error: Opening and ending tag mismatch: body line 237 and div.

    ✉ Line 1676, Column 7: XML Parsing Error: Opening and ending tag mismatch: html line 3 and body.

    I am clueless on a fix for this also, so if you find one…let me know.

    Thank you…Chris

    Hi Chris,
    Sorry… but no fix for that. The JavaScript requires the onload= on the statement currently, and that’s what the W3C validator gripes about. If it’s removed, then the animation doesn’t work (been there, tried that).

    It’s just one of those things that will remain until a better animation script is found.

    Best regards,
    Ken

    Please post a .txt version of the wxnewnmeso.php page. The NEWN-mesomap.php does generate valid XHTML (as the validator shows ok for the homepage of http://northeasternweather.net/ )

    Best regards,
    Ken

    Actually there is a way to do it. It is a bit klunky looking. I will post it when I can dig it up. It’s done with an extra JS that is included after the img tag which then calls the required JS when the action is initiated with the image.