Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help required with Validation 17 errors


Halfpint

Recommended Posts

Hi I am having a few problems validating my web site. I have reduced the errors from 26 to 17.

 

The problem I am having is I don?t know in which file the remaining errors are or how to fix them. The errors I received are below:

 

Line 9, column 18: there is no attribute "MARGINWIDTH"

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin

 

Line 9, column 35: there is no attribute "MARGINHEIGHT"

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargi

 

Line 9, column 49: there is no attribute "TOPMARGIN"

...width="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" righ

 

Line 9, column 66: there is no attribute "BOTTOMMARGIN"

...th="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

 

Line 9, column 81: there is no attribute "LEFTMARGIN"

...rgin="0" bottommargin="0" leftmargin="0" rightmargin="0">

 

Line 9, column 97: there is no attribute "RIGHTMARGIN"

...argin="0" leftmargin="0" rightmargin="0">

 

Line 14, column 35: document type does not allow element "TD" here

<td align="right" valign="bottom"><a href="http://www.a12c4magic.co.uk/account

 

Line 15, column 4: end tag for element "TR" which is not open

</tr>

 

Line 16, column 7: end tag for element "TABLE" which is not open

</table>

 

Line 50, column 324: there is no attribute "BORDER"

...uttons/button_quick_find.gif" border="0" alt="Search" title=" Search "><br>Se

 

Line 167, column 14: end tag for "TR" which is not finished

</tr>

 

Line 322, column 124: cannot generate system identifier for general entity "reviews_id"

...t_reviews_info.php?products_id=11730&reviews_id=1"><img src="images/GamingTok

 

Line 322, column 124: general entity "reviews_id" not defined and no default entity

...t_reviews_info.php?products_id=11730&reviews_id=1"><img src="images/GamingTok

 

Line 322, column 134: reference to entity "reviews_id" for which no system identifier could be generated

...info.php?products_id=11730&reviews_id=1"><img src="images/GamingTokens/MyrTok

 

 

Line 322, column 123: entity was defined here

...ct_reviews_info.php?products_id=11730&reviews_id=1"><img src="images/GamingTo

 

Line 322, column 365: reference to entity "reviews_id" for which no system identifier could be generated

...info.php?products_id=11730&reviews_id=1">Finally

 

 

Line 322, column 123: entity was defined here

...ct_reviews_info.php?products_id=11730&reviews_id=1"><img src="images/GamingTo

 

Any help would be much appreciated :)

Link to comment
Share on other sites

Some of those errors can not be helped, I don't think because of the way the php code and the html code work together. The margin errors are going to stay. WC3 as far as I know does not validate that stuff no matter what you try to do.

 

Is there a particular reason why you are worried about getting the page validated?

 

I have to say hats off to you though, I normally get hundreds of errors on my oscommerce pages when I run them through their validater. Good thing I don't care. lol

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Hi Wendy,

 

I feel if I can achieve validation it will help my web site, well it can't hurt it that's for sure. I feel I will have learnt a little more and the more I learn the more I will improve I hope *LOL

 

Seriously it is all experience and I certainly lack experience when it comes to both php and optimising web sites. :)

Link to comment
Share on other sites

Every error can be removed, and should be removed - they have nothing to do with PHP, which is only a tool that outputs HTML. THe HTML outputted by PHP will be good or bad depending upon what PHP you write.

 

Garbage In, Garbage Out.

 

If you tick the box "verbose results" onthe validator page, you will be given a small amount of text explaining the error and what you should do to remove it.

 

~ You can safely remove those "margin" entries from the <body>

~ You need to use

&

instead of & for URLs (system indentifiers)

~ You likely have a misplaced <td> which is causing the <td>, <tr> and <table> error.

~

Link to comment
Share on other sites

Every error can be removed, and should be removed - they have nothing to do with PHP, which is only a tool that outputs HTML.  THe HTML outputted by PHP will be good or bad depending upon what PHP you write.

 

Garbage In, Garbage Out. 

 

If you tick the box "verbose results" onthe validator page, you will be given a small amount of text explaining the error and what you should do to remove it.

 

~ You can safely remove those "margin" entries from the <body>

~ You need to use

&

instead of & for URLs (system indentifiers)

~ You likely have a misplaced <td> which is causing the <td>, <tr> and <table> error.

~

 

Burt thank you for the advice I will endeavour to correct all the errors, although it may take me a while to get it right. :)

Link to comment
Share on other sites

Can anyone please tell me which file I need to edit in order to correct the error below?

 

I understand it has something to do with the search box but can't figure out which php file to edit.

 

Line 50, column 324: there is no attribute "BORDER"

...uttons/button_quick_find.gif" border="0" alt="Search" title=" Search "><br>Se

 

I have now reduced the errors down to 11

 

Any help would be much appreciated :)

Link to comment
Share on other sites

You can also go for XHTML 1.0 validation by using this contribution: valid XHTML Catalog Side 2.3

 

Thanks for the advice; however as it is meant for a fresh install of ms2 I would be worried that previous alterations I have made might not work, which is one of the reasons why I am trying to fix the errors manually if that makes sense? :)

Link to comment
Share on other sites

this contribution helps with

 

Line 50, column 324: there is no attribute "BORDER"

...uttons/button_quick_find.gif" border="0" alt="Search" title=" Search "><br>Se

 

as far as I can see (I'm down to 9 now)

Forum search

Contributions search

Documentation search (note: docs being adapted for MS3, may be different for MS2)

3 tips for better forum searching

 

Want to post? Read this first:

osCommerce for dummies

Topic name etiquette

 

Basics:

Basics for design

Right syntax to use near '-20, 20'

Cannot re-assign $this

Parse error

Link to comment
Share on other sites

In an ideal world, yes - it is nice to have a page that validates completely. I don't think it's quite as black and white as Burt says, though.

 

For example, on one of my pages, I use a "height" attribute for a <td> tag, which the validator proclaims "does not exist". Funny, that - both IE and Firefox seem to know what it is and handle it fine. When I remove it, the layout screws up.

I don't have the time or enthusiam to spend an hour rewriting a load of nested table HTML to fix something that isn't broken when there are more benefits to be gained elsewhere.

 

Also, alignment tags like "absmiddle" it complains about. Again - the page renders differently if I use the recommended "center" (or "middle", can't remember) and my icons go out of alignment.

 

I agree that the more "important" errors like missing closing tags etc should be fixed - often browsers automatically put these in for you so you never notice. Often, sorting your opening/closing tags so they are correct will slightly alter the page layout, too.

 

In the overall scheme of things, I would consider getting your pages to validate 100% one of the lower priorities.

Link to comment
Share on other sites

this contribution helps with

 

Line 50, column 324: there is no attribute "BORDER"

...uttons/button_quick_find.gif" border="0" alt="Search" title=" Search "><br>Se

 

as far as I can see (I'm down to 9 now)

 

I appreciate the link to the contribution, however I would prefer to correct the errors manually because at least then I will be learning and one day I could have an error that a contribution won?t be able to fix. :)

 

FalseDawn This may not be an ideal world, however I see no reason not to reach for the stars :)

 

So back to my question which is which file do I need to edit in order to correct this error: Line 50, column 324: there is no attribute "BORDER"

...uttons/button_quick_find.gif" border="0" alt="Search" title=" Search "><br>Se

Link to comment
Share on other sites

All the contribution does is show what to change.

 

Change this:

3) "/includes/functions/html_output.php"

 

*edit posted too much info :)*

Forum search

Contributions search

Documentation search (note: docs being adapted for MS3, may be different for MS2)

3 tips for better forum searching

 

Want to post? Read this first:

osCommerce for dummies

Topic name etiquette

 

Basics:

Basics for design

Right syntax to use near '-20, 20'

Cannot re-assign $this

Parse error

Link to comment
Share on other sites

All the contribution does is show what to change.

 

Change this:

3) "/includes/functions/html_output.php"

 

Thank you for letting me know which file to change, can I impose on your kindness and ask what I should replace border=0" with?

 

I assume this is the line that is causing the error?

 

$image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

Link to comment
Share on other sites

Thank you for letting me know which file to change, can I impose on your kindness and ask what I should replace border=0" with?

 

I assume this is the line that is causing the error?

 

$image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

 

I've solved that problem I just change it to this:

 

$image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" alt="' . tep_output_string($alt) . '"';

 

 

and it no longer comes up with the previous error.

 

Ah well only another 10 to go *LOL

Link to comment
Share on other sites

I now have the errors down to 8, 1 of which I think I know where it is just not sure how to correct it. :x

 

Error:

 

Line 14, column 35: document type does not allow element "TD" here

<td align="right" valign="bottom"><a href="http://www.a12c4magic.co.uk/account

 

Source:

<td align="right" valign="bottom"><a href="http://www.a12c4magic.co.uk/account.php"></a> <a href="http://www.a12c4magic.co.uk/shopping_cart.php"></a> <a href="http://www.a12c4magic.co.uk/checkout_shipping.php"></a> </td>

 

 

Which I think is in the header.php file on line 58 and looks like this:

 

<td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' .

Link to comment
Share on other sites

Please help I now have the errors down to 4 on most pages, however I'm having trouble finding the rest of the files that need editing. Below is a list of files I have either edited or found what I think might need editing.

 

Can someone please take a look at the list and let me know if I have edited the wrong files or point me to the files that still need editing.

 

Root

 

product_reviews = Line 108 changed '&reviews_id=' to '&reviews_id='

product_reviews_write.php = Line 125 Changed 'action=process&products_id=' to 'action=process&products_id='

reviews.php = Line 82, '&reviews_id=' to '& reviews_id='

reviews.php = Line 93 '&reviews_id=' to '&reviews_id='

 

Includes/application_top = Line 499 Change '&products_id=' to '&products_id='

 

 

Includes/boxes/reviews.php = Line 38 x 2 '&reviews_id=' to '&reviews_id='

 

 

Includes/boxes/manfacturer_info.php = Line 29 ** (No changed made)

 

 

Includes/boxes/order_history.php = Line 38 has 'action=cust_order&pid=' (do I need to change this?)

 

 

Includes/modules/product_listing.php = Line 98 changed '&products_id=' to '&products_id=',

 

Includes/modules/product_listing.php =Line 126 changed '&products_id=' to '&products_id=',

 

Admin Root

 

reviews.php &rID= changed to &rID= on the following lines:

 

Line 27, 87, 115, 137, 168 X 2, 177, 221, 223, 226, 229, 254, 260 x2

--------------------------------------------------------------------------------------------------

Here are the errors I receive when attempting to validate my home page, url can be found in my profile.

 

 

Line 318, column 421: cannot generate system identifier for general entity "reviews_id"

 

...t_reviews_info.php?products_id=11785&reviews_id=6">Champions of Kamigawa Tour

 

Line 318, column 421: general entity "reviews_id" not defined and no default entity

 

...t_reviews_info.php?products_id=11785&reviews_id=6">Champions of Kamigawa Tour

 

Line 318, column 431: reference to entity "reviews_id" for which no system identifier could be generated

 

...info.php?products_id=11785&reviews_id=6">Champions of Kamigawa Tournament Pac

 

Line 318, column 420: entity was defined here

 

...ct_reviews_info.php?products_id=11785&reviews_id=6">Champions of Kamigawa Tou

--------------------------------------------------------------------------------------------------

Any help would be much appreciated and I'm sure others would find this helpul too

Link to comment
Share on other sites

Thanks to Chemo my errors have been fixed, here's how:

 

in includes/functions/html_output.php about Line 69

 

return $link; changed to return htmlspecialchars(utf8_encode($link));

 

Hope this helps anyone else who is having similar problems :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...