Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Major Bug in RC2?


Micke

Recommended Posts

Hi All!

 

When I try to validate my RC2 site the validating tool claims that there are no lines of code to validate.

I have put other non-oscommerce files in the same catalog directory "test.htm" and "test.php" and they both pass validation fine and the tool reports lines of source code as opposed to any of the osCommerce files.

 

Even though the site and the code is viewable in the browser it seams to be restricted from viewing by validation tools and bots.

 

What's wrong? Do I need another version of osCommerce? Is there a setting or file somewhere that I need to change?

Please help!

 

//Micke

Link to comment
Share on other sites

Hi All!

 

Just to make sure there was nothing wrong with the host's server I uploaded the shop to another host's server that I've never had problems with before. This did not solve anything. The problem's still there!

Please help me out, I've got no idea whats wrong!

 

//Micke

Link to comment
Share on other sites

Hi All!

 

Just to make sure there was nothing wrong with the host's server I uploaded the shop to another host's server that I've never had problems with before. This did not solve anything. The problem's still there!

Please help me out, I've got no idea whats wrong!

 

//Micke

Does who's online show any bots (assuming url is the same)?

Link to comment
Share on other sites

osCommerce, even in the newest versions, uses an invalid DOC TYPE

 

It uses this:

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

 

When it shoudl be using this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

 

and that's why the Validator won't work.

 

Vger

Link to comment
Share on other sites

osCommerce, even in the newest versions, uses an invalid DOC TYPE

 

It uses this:

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

 

When it shoudl be using this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

 

and that's why the Validator won't work.

 

Vger

You are soooo good.

 

The worry seems to be that bots and spiders won't index the site. Would the invalid doc type cause this, or should the thread originator change the thread title to " Spiders/boys not indexing site" or "I went off half cocked an need to apoligise for saying that RC2 has a major bug"?

Link to comment
Share on other sites

Does who's online show any bots (assuming url is the same)?
never caught a bot there...

Googles webmasters tools claims they have been there since november 07 collecting an average of 2kb a day...

Yahoo's got my mainpage in their cache (but it's blank, like a page without source code would).

Since the report says there are 'no' lines of source I don't think the doctype is the issue...

//Micke

Link to comment
Share on other sites

you have this 2x

 

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

 

delete the last one

Thanks! You were right - I took away the line... The page still works but still there is no source code to validate.

If the validator can't access the content on the site - can googlebot and the others?

 

One more thing... I have three more files in the catalog directory:

  • test.htm (plain html has source code according to Dr. Watson)
  • test.php (plain html with .php extension, has source code according to Dr. Watson)
  • testphp.php (plain html and php code, has source code according to Dr. Watson)

//Micke

Link to comment
Share on other sites

you have a missing </div>

 

here:

 

<TD WIDTH="595" HEIGHT="28" COLSPAN="12" ROWSPAN="1" bgcolor="#FFFFFF"><div align="right">

<!-- start headercart //-->

<div align="right"><a href="shopping_cart.php"> <span class="headercart">Your Cart Contains <strong>0 items</strong></span></a><span class="headercart"><br>

Sub Total:

$0.00

 

<!-- end headercart //-->

</div></TD>

 

or you have <div align="right">

one too many

Link to comment
Share on other sites

Hi All!

 

Do I need to install a previous version of osCommerce than RC2 and go through all the work with contributions and language files again to make an indexable shop?

If so, where can I pick up an older version?

 

//Micke

Link to comment
Share on other sites

I copied a page from your site and hosted it on my own server at clubosc.com - it validated fine from there (well, it had about 55 errors) but it did validate. I would suggest therefore that you have a problem that is localised to your server, and that all the previous suggestions about doctypes, seo urls and all the rest of it are a complete red herring ;)

Link to comment
Share on other sites

I copied a page from your site and hosted it on my own server at clubosc.com - it validated fine from there (well, it had about 55 errors) but it did validate. I would suggest therefore that you have a problem that is localised to your server, and that all the previous suggestions about doctypes, seo urls and all the rest of it are a complete red herring ;)

Hmm... How did you 'copy a page'?

You see - if I browse to the site, view the code, copy it and the paste it in the validator (validator.w3.org's "direct input" option) the code validates nicely with a lot of errors.

When I try the "Validate by URl" option the validator says the document ends at Line 1, Column 0.

Same thing when I upload the entire site to another webserver where I have three other stores doing just fine.

And the three test files (mentioned 7 posts back) does not end at Line 1, Column 0.

Therefore I believe the problem is not in the 2 servers.

The unique thing with this site is that it's an v2.2 RC1 and that the validators and searchbots can't get access to it.

 

//Micke

Link to comment
Share on other sites

Hmm... How did you 'copy a page'?

You see - if I browse to the site, view the code, copy it and the paste it in the validator (validator.w3.org's "direct input" option) the code validates nicely with a lot of errors.

When I try the "Validate by URl" option the validator says the document ends at Line 1, Column 0.

Same thing when I upload the entire site to another webserver where I have three other stores doing just fine.

And the three test files (mentioned 7 posts back) does not end at Line 1, Column 0.

Therefore I believe the problem is not in the 2 servers.

The unique thing with this site is that it's an v2.2 RC1 and that the validators and searchbots can't get access to it.

 

//Micke

So what is at Line 1, Column 0

Link to comment
Share on other sites

So what is at Line 1, Column 0

well... viewing the shop's source files in the browser there's a < as in <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN".

Seeing it the way a bot does - I don't know... empty, end of file...

The non-osC test files' all got the same line in the top row and apparently the validation tools can access them.

 

//Micke

Link to comment
Share on other sites

well... viewing the shop's source files in the browser there's a < as in <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN".

Seeing it the way a bot does - I don't know... empty, end of file...

The non-osC test files' all got the same line in the top row and apparently the validation tools can access them.

 

//Micke

So what is at Line 1, Column 0 of the index.php file. Post the first 34 lines.

Link to comment
Share on other sites

Not sure what you're after but here's the first 34 lines in index.php:

<?php
/*
 $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

// the following cPath references come from application_top.php
 $category_depth = 'top';
 if (isset($cPath) && tep_not_null($cPath)) {
$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
$cateqories_products = tep_db_fetch_array($categories_products_query);
if ($cateqories_products['total'] > 0) {
  $category_depth = 'products'; // display products
} else {
  $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
  $category_parent = tep_db_fetch_array($category_parent_query);
  if ($category_parent['total'] > 0) {
	$category_depth = 'nested'; // navigate through the categories
  } else {
	$category_depth = 'products'; // category has no products, but display the 'no products' message
  }
}
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
?>

//Micke

Link to comment
Share on other sites

I copied the index.php from a vanilla download of osc to a test directory on my web site and it failed at line 2 column 0 (as expected - to open)

 

So for yours it is failing between

 

*/

and

require('includes/application_top.php');

 

you may have some garbage there that can't be seen.

 

Also my header says

 

$Id: index.php 1739 2007-12-20 00:52:16Z hpdl $

 

yours says

 

$Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $

 

So you could try getting a fresh copy.

Link to comment
Share on other sites

Thanks for the tip.

I got myself a brand new index.php from "Downloads".

That didn't work either... But then none of my osCommerce files do (like privacy.php for instance...)

I got the feeling that the files are restricted from reading somehow... maybe by something in application_top.php?

Something connected to spiders.txt gone berserk? (I took away the line "w3c_validator" from spiders.txt - but with no result)

//Micke

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...