Jump to content



Issue Information

  • #000391

  • 0 - None Assigned

  • New

  • 2.3.1

  • -

Issue Confirmations

  • Yes (1)No (0)
Photo

Duplicate content in cpath url cpath, duplicate, categories

Posted by acidvertigo on 17 November 2011 - 13:35

In Oscommerce 2.3.1 if the number of the subcategory is in the url without the category number it will generate a duplicate content page.

for example:

Category n. 3 --> Subcategory n.15

the right path is http://localhost/cat....php?cPath=3_15

example1.jpg

duplicate path is: http://localhost/cat...ex.php?cPath=15

example2.jpg

Ignored!

This is not a duplicated data. Check it out "categories_box".
And category module url works as cpath=subpath_subpath_ ..... mainpath.
You can also add the canonical url for search engines about that.

Be sure before the adding a bug report.

Sorry,

but i continue to consider this as a bug.

The oscommerce category module url works as "cpath=category_subcategory_subcategory" and this is ok.

But when in oscommerce "cpath=category_subcategory" and "cpath=subcategory" give the same page, it generates duplicate content, thats all.

Oscommerce code by default has no canonical link system in it. You can add this with add on for sure, but adding the canonical link and a routine check for the correct url in the default oscommerce code (2.3.2 version for example) can help much more.

I reported this as bug also because some user included me find several hundreds of urls with cpath=subcategory duplicated content in google results.

I have modified this function found on this forum in general.php as it follows

function get_full_cat_from_cPath($zipote)
{
$query1=tep_db_query("SELECT parent_id FROM categories WHERE categories_id =  '" . $zipote . "'");
$land = tep_db_fetch_array($query1);
$cat_completa = $zipote;
while (! $land[parent_id] == 0) {
tep_redirect(tep_href_link(FILENAME_DEFAULT));
  tep_exit();
$cat_completa = $land[parent_id] . '_' . $cat_completa;
}
	    return $cat_completa;
}

calling this function in index.php redirects to the default page. UNFORTUNATELY it works only for the categories were the parent_id is not set.

for example if the orginal cPAth=160_479 i go to the correct page, calling only cPAth 479 it redirects to the dafault page (deleting in my case some hundreds of duplicate pages). But if i call 1_479 (1 is a existant parent_id ) this code does not make the redirect.

p.s. in my webmaster tools i have duplicate content for urls with 8 concatenated cPath like 8_256_47_48_8_78_54_132 and still growing!!!!

I understand that this maybe has no or poor penality but my site becomes huge and slow indexed wasting server resources
unfortunately no canonical url contrib can resolve this behaviour

Hi acidvertigo,

it looks like some crawl robots take bulshits and makes new projects for oscommers /rolleyes.gif' class='bbc_emoticon' alt=':rolleyes:' /> . Do you use sitemaps? I dont have similar experiencies but i use sitemaped and non sitemapped sites.

Which crawl do it?


Regards,
Gergely

Yes I use sitemaps I'm not the only with this problem. Other users report it:

http://forums.oscomm...riable-indexed/

http://forums.oscomm...-on-categories/

Seems that google tries to find new links changing randomly the cpath parameter. On this duplicate pages every link follows the Sto arrivando!,e beaviour generating hundreds of wrong cpath links that google follows


@acidvertigo: Are you still having problems with this issue?

With canonical tags taken from KISS meta tag contrib, USU5 pro contrib and some code from github i have reduced signficantly this behaviour.

My ranking in google has not changed so much, but i feel more quiet and saved a lot of server resource.

I think that is a "MUST" for next versions of oscommerce to return at least a 404 for non existant pages.