Jump to content

How do i remove this code to stop google giving me sitemap warnings


Recommended Posts

Hello,

Google is throwing warning messages in webtools due to sitemap errors, im using sitemap v1.3 module

how do i stop the sitemap generator adding the ?id_lang=1 at the end of every sitemap url this is causing major problems and has now put me on page 27 from page 4 :-(

I think this is the section i need to change but im unsure in gsitemap.php

(THIS LINE AS BELOW) 'id_lang', intval($product['id_lang']))));

foreach($products as $product)
{
if (($priority = 0.7 - ($product['level_depth'] / 10)) < 0.1)
$priority = 0.1;
$sitemap = $xml->addChild('url');
$sitemap->addChild('loc', 'http://'.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').htmlspecialchars($this->getUrlWith($link->getProductLink($product['id_product'], $product['link_rewrite'], $product['category'], $product['ean13']), 'id_lang', intval($product['id_lang']))));
$sitemap->addChild('priority', $priority);
$sitemap->addChild('lastmod', $product['date_upd']);
$sitemap->addChild('changefreq', 'daily');

Thanks so much in advance

Link to comment
Share on other sites

  • 2 weeks later...

I get the same errors from google ...

It appears that all of my products have default category set to HOME, because I want them to appear in home as well as their specific category, do I have to change this on EVERY product? Is there a quicker way to do this, or is there a workaround because surely this is a bug ???

Thanks

Link to comment
Share on other sites

Yes it's a bug, the bug is that home category dosn't have a url_rewrite name (I think atleast that was the problem).
it may work if you edit the database and set a url_rewritename on home category, but I'm not 100% sure.

if not, yes you need to edit all products to change the default category.

Link to comment
Share on other sites

×
×
  • Create New...