Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

w3c Validation


stubbsy

Recommended Posts

Posted

Hi,

 

I've been validating one of my osc sites using the w3c validator over the past week and have finally got it down to 1 error..

 

Line 237, column 19: end tag for "TABLE" which is not finished

 

</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 (e.g. 'ul') which requires a child element (e.g. 'li') that you did not include. Hence the parent element is "not finished", not complete.

 

But I can't for the life of me find the error, I was wondering if anyone could point me in the right direction for finding this error as I can't see it for the life of me :)

 

My site is Myfirstchopper.com

 

tia

 

stubbsy

Posted

Look at this code:

<table border="0" width="100%" cellspacing="0" cellpadding="0">

             <!--<tr>
               <td class="pageHeading">Welcome to MyFirstChopper.Com</td>
               <td class="pageHeading" align="right"></td>
             </tr>-->

           </table>

You have started a table that has no rows or columns...comment the entire table or delete.

 

BTW, the validator shows 15 errors: http://validator.w3.org/check?uri=http%3A%...tically%29&ss=1

Posted

Oops, i had been working on it at work and overwrote the file I'd validated last night.

 

I've deleted the suspect table but still have that blooming table error :(

 

Thanks for your help though, much appreciated :)

Posted

I've managed to fix it by uploading a clean index. The coding error was obviously self inflicted as I'm now valid :)

Posted
I'm now valid :)

It is always a pleasure to meet a like minded designer.

 

Isn't a good feeling to have a page/site valiated? Now how about XHTML 1.0 transitional!!

Posted
I've managed to fix it by uploading a clean index. The coding error was obviously self inflicted as I'm now valid :)

Good deal...and congratulations!

 

It is always a pleasure to meet a like minded designer.

 

Isn't a good feeling to have a page/site valiated?  Now how about XHTML 1.0 transitional!!

...there aren't too many of us...that's for sure!

Posted
Now how about XHTML 1.0 transitional!
Why transitional? Better go for strict right away :)
Posted

Ok, so am now in the process of validating against XHTML 1.0 trans and having a couple of problems.

 

Not knowing anything about php, how does one get around the <img> tag and it's self-closing properties?

 

As the validator works on a parsed file, I get loads of errors relating to <img src="...."> and the missing ' />'. How can I add this globally and/or what file(s) would I need to edit to achieve this?

 

TIA

Posted

Thanks for the support guys, yep it is a good feeling get there in the end. This is the first time I've attempted it so I thought I'd stick with something straight forward, but I'll definately be moving up now I've completed this first one :)

Posted

[/code]

Ok, so am now in the process of validating against XHTML 1.0 trans and having a couple of problems.

 

Not knowing anything about php, how does one get around the <img> tag and it's self-closing properties?

 

As the validator works on a parsed file, I get loads of errors relating to <img src="...."> and the missing ' />'.  How can I add this globally and/or what file(s) would I need to edit to achieve this?

 

TIA

Ok, so I found out what to do now and for those of you who don't know, here it is.

 

In catalog/includes/functions/html_output.php find this piece of code

// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
   $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

   if (tep_not_null($alt)) {
     $image .= ' title=" ' . tep_output_string($alt) . ' "';
   }

   if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
     if ($image_size = @getimagesize($src)) {
       if (empty($width) && tep_not_null($height)) {
         $ratio = $height / $image_size[1];
         $width = $image_size[0] * $ratio;
       } elseif (tep_not_null($width) && empty($height)) {
         $ratio = $width / $image_size[0];
         $height = $image_size[1] * $ratio;
       } elseif (empty($width) && empty($height)) {
         $width = $image_size[0];
         $height = $image_size[1];
       }
     } elseif (IMAGE_REQUIRED == 'false') {
       return false;
     }
   }

   if (tep_not_null($width) && tep_not_null($height)) {
     $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
   }

   if (tep_not_null($parameters)) $image .= ' ' . $parameters;

   $image .= '>';

   return $image;
 }

 

The change is this piece of code

    $image .= '>';

just add a space and a backslash like so

    $image .= ' />';

 

I hope this helps others.

  • 4 weeks later...
Posted
Good deal...and congratulations! 

...there aren't too many of us...that's for sure!

 

Chemo .. would you mind to take a look at W3c validation page

and give me a hint how to solve these 30 errors?

 

i would also really like to have this done ..

 

thanx for your time in advance

Posted
Chemo .. would you mind to take a look at W3c validation page

and give me a hint how to solve these 30 errors?

 

i would also really like to have this done ..

 

thanx for your time in advance

 

 

 

I too am down to my last 16 errors (from 107!) and totally stumped by all the table errors. my tester page validation. If anyone knows how to correct these I'd be most grateful.

 

Also, I did cheat to get this far. When I go to "view source" from my browser, I could see what I wanted to change (like &'s to code in the cpath strings) but I have no idea as to where to find them in the php files. So my cheat was to copy and paste the "view source" save it as an html file and upload as tester.html (which I can replace my index.html with and not move my enitre store from ecommerce/os/catalog) and it works. But now I don't know how to get to the actual files I need to edit. Any help would be much appreciated.

Thank you for your time,

Kim

Log Cabin Fever Gifts

Posted
down to 8 problems .. but here is definitive end for me  ;)

 

I am :x with envy!!!! Good job. It's like pulling teeth isn't it. I have no clue as to what I am doing... I just keep plugging along and reading posts and contribs. BTW, I just deleted those topmargin etc. things :devil: it doesn't seem to be hurting anything so far.

Log Cabin Fever Gifts

Posted
it was hurting my site .. did you check it in Firefox also?

 

I just downloaded Firefox and gave it a shot. The only thing that is out of wack is my page is not centered, it's to the left. Other than that it is okay. :blush:

Log Cabin Fever Gifts

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...