Guest Posted April 28, 2005 Share Posted April 28, 2005 I've been validating my pages with validator.w3.org and have come up against a block... The "&" symbol in many of my URLs is causing tons of validation errors, and I haven't yet figured out how to fix it without breaking things. :-" First question is, does anyone know a quick fix? :) Assuming the answer is no, is validation important enough to make this worth pursuing? Link to comment Share on other sites More sharing options...
Wendy James Posted April 28, 2005 Share Posted April 28, 2005 I have never, ever worried about the w3 validation to be honest... no matter what sites I have done. Straight html or not. As long as the pages look the way I want them to on different browsers and everything works.... I am happy. Others may dissagree though. As for the & thing there are contributions out there, that will change how the url looks which may help with that aspect of it but I don't know as I have never tested my sites. Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep. Link to comment Share on other sites More sharing options...
boxtel Posted April 28, 2005 Share Posted April 28, 2005 I have never, ever worried about the w3 validation to be honest... no matter what sites I have done. Straight html or not. As long as the pages look the way I want them to on different browsers and everything works.... I am happy. Others may dissagree though. As for the & thing there are contributions out there, that will change how the url looks which may help with that aspect of it but I don't know as I have never tested my sites. <{POST_SNAPBACK}> I suspect that html validation was invented by html QA personell as a rainy weekend excercise. Treasurer MFC Link to comment Share on other sites More sharing options...
Guest Posted May 1, 2005 Share Posted May 1, 2005 I've been validating my pages with validator.w3.org and have come up against a block... The "&" symbol in many of my URLs is causing tons of validation errors, and I haven't yet figured out how to fix it without breaking things. :-" First question is, does anyone know a quick fix? :) <{POST_SNAPBACK}> Yes :)http://www.oscommerce.com/community/contributions,2027 I use the validator as a tool, but it's not a goal to reach 100%validating pages. Not all HTML errors cause problems, but pages that validate are a lot easyer to check, and make it very easy to find real errors. Many times I see people posting questions about why their site looks wrong in a certain browser, often because they created a good looking site/page by the trial and error "method", checking mostley one browser after each edit, and to be suprised when they finally check another browser (or even only another version of the same browser) to see weird errors. Most of those cases where people have been searching for the cause of such an error for hours, or even days, the errors they made take only minutes to find by using a validator such as validator.w3.org. And I assume everyone knows by now how easy it is to check any page you are viewing with FireFox + the right FireFox tool (by Chris Pederick). It only takes zero mouse clicks! (keyboard shortcut :) ) Even for sites on localhost on your own PC :thumbsup: Link to comment Share on other sites More sharing options...
Jud Posted May 6, 2005 Share Posted May 6, 2005 Getting HTML valid pages is very important ... I managed to get my pages XHTML 1.0 Transitional, it was hard, but eventually I got it. I had to use search engine friendly URL's and add alt tags for the pixes_trans.gif image that is used about 100 times in every osc page :). The only bad thing is that eventually I started editing the content and made a couple of errors in the html, so it isn't exactly validating now :D Jud Link to comment Share on other sites More sharing options...
boxtel Posted May 6, 2005 Share Posted May 6, 2005 Getting HTML valid pages is very important ... I managed to get my pages XHTML 1.0 Transitional, it was hard, but eventually I got it. I had to use search engine friendly URL's and add alt tags for the pixes_trans.gif image that is used about 100 times in every osc page :). The only bad thing is that eventually I started editing the content and made a couple of errors in the html, so it isn't exactly validating now :D Jud <{POST_SNAPBACK}> you do not need the trans pixels : function tep_draw_separator($image = 'pixel_silver.gif', $width = '100%', $height = '1') { if ($image == 'pixel_trans.gif') { return '<table height="' . $height . 'px" width="' . $width . '" cellpadding="0" cellspacing="0"> <tr> <td></td> </tr> </table>'; } else { return tep_image(DIR_WS_IMAGES . $image, '', $width, $height); } } Treasurer MFC Link to comment Share on other sites More sharing options...
pickupman Posted May 7, 2005 Share Posted May 7, 2005 Your question about the &'s in the URLs need to be replaced with & which doing Ctrl+F in the code and search for &product_id= or &manufacturer= or &cpath=. Those are the three server variables that are set alot. Then after replacing the ones hard coded in the pages, go into /catalog/includes/html_output.php and do the same in there. Osc calls these functions to build url's and <img src="">. Go through the codes and replace the &'s with &. Most of the pages were easy to find and correct by looking at the errors from the validator, and then see how were the code is called. I spent about 3-4 hours finding all of them. There are a few here and there in the other includes folder. My store is validated. shop.oldeparsonage.com I have the validate button in the footer. Link to comment Share on other sites More sharing options...
Wendy James Posted May 7, 2005 Share Posted May 7, 2005 Many times I see people posting questions about why their site looks wrong in a certain browser, often because they created a good looking site/page by the trial and error "method", checking mostley one browser after each edit, and to be suprised when they finally check another browser (or even only another version of the same browser) to see weird errors. Most of those cases where people have been searching for the cause of such an error for hours, or even days, the errors they made take only minutes to find by using a validator such as validator.w3.org. I have been doing this stuff (designing sites) for around 9 years give or take. I always, always, always check my sites in the most commonly used browsers and on some not so common. I learned a long time ago to always check. Luckily these days most browsers operate the same way and read code the same way. Not like it used to be... boy what a headache it was. lol =) Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep. Link to comment Share on other sites More sharing options...
Guest Posted May 7, 2005 Share Posted May 7, 2005 Your question about the &'s in the URLs need to be replaced with & which doing Ctrl+F in the code and search for &product_id= or &manufacturer= or &cpath=. Those are the three server variables that are set alot. Then after replacing the ones hard coded in the pages, go into /catalog/includes/html_output.php and do the same in there. Osc calls these functions to build url's and <img src="">. Go through the codes and replace the &'s with &. Most of the pages were easy to find and correct by looking at the errors from the validator, and then see how were the code is called. I spent about 3-4 hours finding all of them. There are a few here and there in the other includes folder.My store is validated. shop.oldeparsonage.com I have the validate button in the footer. <{POST_SNAPBACK}> This absolutely will not work for me. I get a store that validates just fine and has a non-functional shopping cart. There is a contribution that is supposed to address this problem by replacing the "&" with "&" again when it's necessary, but this also doesn't work for me (no idea why). Link to comment Share on other sites More sharing options...
Jumping Rabbit Posted May 7, 2005 Share Posted May 7, 2005 This absolutely will not work for me. I get a store that validates just fine and has a non-functional shopping cart. There is a contribution that is supposed to address this problem by replacing the "&" with "&" again when it's necessary, but this also doesn't work for me (no idea why). <{POST_SNAPBACK}> There are atleast 2 contributions for xhtml validation and atleast 1 for html4.01 , take a look at these for hints on how to address your problem. Faster Checkout - osCommerce Knowledge Base - Anyone meet offline?, Has anyone of you cyberkids meet offline? For newbees do atleast read this 4 points: Basic info - Search tips and help - Posting tips and help - Basics for Design Link to comment Share on other sites More sharing options...
Halfpint Posted June 9, 2005 Share Posted June 9, 2005 Your question about the &'s in the URLs need to be replaced with & which doing Ctrl+F in the code and search for &product_id= or &manufacturer= or &cpath=. Those are the three server variables that are set alot. Then after replacing the ones hard coded in the pages, go into /catalog/includes/html_output.php and do the same in there. Osc calls these functions to build url's and <img src="">. Go through the codes and replace the &'s with &. Most of the pages were easy to find and correct by looking at the errors from the validator, and then see how were the code is called. I spent about 3-4 hours finding all of them. There are a few here and there in the other includes folder.My store is validated. shop.oldeparsonage.com I have the validate button in the footer. <{POST_SNAPBACK}> Hi I have most of my pages down to about 4 errors, however I have been unable to locate the file that one of the errors refers to: Line 318, column 455: cannot generate system identifier for general entity "reviews_id" <a href="http://www.a12c4magic.co.uk/product_reviews_info.php?products_id=15630&reviews_id=9">this is silly. When I looked at the products_reviews.php I could only fine one & which was on line 125 and I replaced it with & I am obviously missing something, I have been going through the code since 10am yesterday and didn't get to bed until 4am and then started again today at 10.30am so any guidance as to where to look would be much appreciated I have changed & to & in the following files already: Root product_reviews = Line 108 product_reviews.php = Line 125 reviews.php = Line 82, 93 Includes application_top = Line 499 Includes/boxes/reviews.php = Line38 Includes/boxes/manfacturer_info.ph = Line? Link to comment Share on other sites More sharing options...
Halfpint Posted June 10, 2005 Share Posted June 10, 2005 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 More sharing options...
Guest Posted June 10, 2005 Share Posted June 10, 2005 in includes/functions/html_output.php about Line 69 return $link; changed to return htmlspecialchars(utf8_encode($link)); <{POST_SNAPBACK}> Nice solution, but if I block cookies from your shop's site, I am not able to add products from the products listing on the index page anymore (on product_info.php it seems to work though). I think this has something to do with the last change you made, if so I might know a simple solution for this problem (have to look it up). Link to comment Share on other sites More sharing options...
Halfpint Posted June 10, 2005 Share Posted June 10, 2005 Nice solution, but if I block cookies from your shop's site, I am not able to add products from the products listing on the index page anymore (on product_info.php it seems to work though). I think this has something to do with the last change you made, if so I might know a simple solution for this problem (have to look it up). <{POST_SNAPBACK}> Oh drat you're right, gee just when you think you've sorted things out another problem jumps up :'( Link to comment Share on other sites More sharing options...
Halfpint Posted June 10, 2005 Share Posted June 10, 2005 Oh drat you're right, gee just when you think you've sorted things out another problem jumps up :'( <{POST_SNAPBACK}> Problem solved with help from Chemo I change the settings in my includes/config.php from these: define('HTTP_COOKIE_DOMAIN', ''); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', ''); to these: define('HTTP_COOKIE_DOMAIN', '.a12c4magic.co.uk'); define('HTTPS_COOKIE_DOMAIN', '.a12c4magic.co.uk'); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.