Jump to content

New Sitemap in 1.5.4 issue with incorrect URL


Recommended Posts

Please help;

I have spent hours on this and found this issue over and over again and even though some say solved it is not for me.

When I submit my sitemap to Google using the URL provided by the Google sitemap modules I get HTML error 404.

If I put the URL into my browser it loads fine.

I was hoping the update for the module would solve the problem but no.

Also I can not get the CRON job to work.

Below are the URL's I get from the module;

https://www.cwshealing.eu/store/index_sitemap.xml'>https://www.cwshealing.eu/store/index_sitemap.xml

https://www.cwshealing.eu/store/en_0_sitemap.xml'>https://www.cwshealing.eu/store/en_0_sitemap.xml

None work even with the wght and a space as mentioned in other posts.

Below is the CRON job URL;

http://www.cwshealing.eu/store/modules/gsitemap/gsitemap-cron.php

I installed Prestashop at https://www.cwshealing.eu/store

As you can see the Google sitemap is at HTTPS and the cron job is at HTTP could this be the problem?

Hope you can help and thanks for reading.

Chris

  • Like 1
Link to comment
Share on other sites

Hi,

 

After upgrade to 1.5.4 I have noticed upgraded sitemap module, but after generating sitemap it messed up the links... for some reason, the link contain the category where the product belong to.

 

Here how the link looks like at the moment (after update):

 

mywebsite.com/category/168-product-name.html

 

 

And it's throwing error 404 as this is how it should be:

 

mywebsite.com/168-product-name.html

 

Is there an easy way to fix it temporarily? Thanks

Link to comment
Share on other sites

I have same problem.

 

i have 2 prestashop shopping carts.

 

1 of my website works with

http://mywebsite.com/en_0_sitemap.xml

 

but other one is not working

http://mywebsite.com/en_0_sitemap.xml

automatically redirect

http://mywebsite.com/_0_sitemap.xml

and given error 404

 

i need your help to resolve this error.

 

How can i give custom name for site map like "g_sitemap.xml"

 

i have issue with google site map module v 2.1

 

we need resolve this issue together.

 

Have a nice day.

:)

Link to comment
Share on other sites

Dear friends

 

I've find solution for showing incorrect url for xml sitemap on Google Sitemap module v 2.1

after editing you can access xml sitemap url like http://mywebsite.com/sitemap.xml

 

I've checked it on PS v 1.5.3.1 for English Language.

It is working correctly.

 

I've edited gsitemap.php file and configuration.tpl file.

 

Here are the steps. (Be careful. Back-up original file before editing)

 

01. Edit gsitemap.php file

 

/modules/gsitemap/gsitemap.php

 

======================

 

line 767

 

$writeFd = fopen(dirname(__FILE__).'/../../'.$lang.'_'.$index.'_sitemap.xml', 'w');

 

to

 

$writeFd = fopen(dirname(__FILE__).'/../../sitemap.xml', 'w');

 

======================

 

line 203

 

'gsitemap_feed_exists' => file_exists(dirname(__FILE__).'/../../index_sitemap.xml'),

 

to

 

'gsitemap_feed_exists' => file_exists(dirname(__FILE__).'/../../sitemap.xml'),

 

======================

 

line 705

 

fopen('http://www.google.com/webmasters/sitemaps/ping?sitemap='.urlencode('http'.(Configuration::get('PS_SSL_ENABLED') ? 's' : '').'://'.Tools::getShopDomain(false, true).__PS_BASE_URI__.'index_sitemap.xml'), 'r');

 

to

 

fopen('http://www.google.com/webmasters/sitemaps/ping?sitemap='.urlencode('http'.(Configuration::get('PS_SSL_ENABLED') ? 's' : '').'://'.Tools::getShopDomain(false, true).__PS_BASE_URI__.'sitemap.xml'), 'r');

 

=====================

 

line 813

 

$this->_saveSitemapLink($lang.'_'.$index.'_sitemap.xml');

 

to

 

$this->_saveSitemapLink('sitemap.xml');

 

=====================

 

line 885

 

file_put_contents(dirname(__FILE__).'/../../index_sitemap.xml', $xml_feed->asXML());

 

to

 

file_put_contents(dirname(__FILE__).'/../../sitemap.xml', $xml_feed->asXML());

 

=====================

 

02. Edit configuration.tpl file

 

/modules/gsitemap/tpl/configuration.tpl

 

======================

 

line 5

 

{l s='Your Sitemaps were successfully created. Please do not forget to setup the url' mod='gsitemap'} <a href="{$gsitemap_store_url}index_sitemap.xml"><span style="text-decoration: underline;">{$gsitemap_store_url}index_sitemap.xml</a></span> {l s='in your Google Webmaster account' mod='gsitemap'}.

 

to

 

{l s='Your Sitemaps were successfully created. Please do not forget to setup the url' mod='gsitemap'} <a href="{$gsitemap_store_url}sitemap.xml"><span style="text-decoration: underline;">{$gsitemap_store_url}sitemap.xml</a></span> {l s='in your Google Webmaster account' mod='gsitemap'}.

 

- or ad this to open sitemap with new window (click link on module page) -

 

{l s='Your Sitemaps were successfully created. Please do not forget to setup the url' mod='gsitemap'} <a href="{$gsitemap_store_url}sitemap.xml" target="_blank"><span style="text-decoration: underline;">{$gsitemap_store_url}sitemap.xml</a></span> {l s='in your Google Webmaster account' mod='gsitemap'}.

 

=======================

 

line 24

 

{l s='Please set up the following Sitemap URL in your Google Webmaster account:' mod='gsitemap'}<br/> <a href="{$gsitemap_store_url}index_sitemap.xml"><span style="color: blue;">{$gsitemap_store_url}index_sitemap.xml</span></a><br/><br/>

 

to

 

{l s='Please set up the following Sitemap URL in your Google Webmaster account:' mod='gsitemap'}<br/> <a href="{$gsitemap_store_url}sitemap.xml"><span style="color: blue;">{$gsitemap_store_url}sitemap.xml</span></a><br/><br/>

 

=======================

 

Good Luck and Have a nice day. :)

Edited by White Lion (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

Hi,

 

After upgrade to 1.5.4 I have noticed upgraded sitemap module, but after generating sitemap it messed up the links... for some reason, the link contain the category where the product belong to.

 

Here how the link looks like at the moment (after update):

 

mywebsite.com/category/168-product-name.html

 

 

And it's throwing error 404 as this is how it should be:

 

mywebsite.com/168-product-name.html

 

Is there an easy way to fix it temporarily? Thanks

 

If you have presta 1.4.x, change in gsitemap.php

 

if ($category->id_image)
$image_link = $this->context->link->getCatImageLink($category->link_rewrite, (int)$category->id_image, 'category_default');

to

if ($category->id_image)
$image_link = 'http'.(Configuration::get('PS_SSL_ENABLED') ? 's' : '').'://'.Tools::getMediaServer(THEME_CAT_DIR).THEME_CAT_DIR.((!file_exists(PS_CAT_IMG_DIR.'/'.(int)$category->id.'-category.jpg')) ? $lang['iso_code'].'default' : (int)$category>id).'-category.jpg';

 

and

$image_link = 'http'.(Configuration::get('PS_SSL_ENABLED') ? 's' : '').'://'.Tools::getMediaServer(THEME_MANU_DIR).THEME_MANU_DIR.((!file_exists(PS_MANU_IMG_DIR.'/'.(int)$manufacturer->id.'-medium_default.jpg')) ? $lang['iso_code'].'default' : (int)$manufacturer>id).'-medium_default.jpg';

to

$image_link = 'http'.(Configuration::get('PS_SSL_ENABLED') ? 's' : '').'://'.Tools::getMediaServer(THEME_MANU_DIR).THEME_MANU_DIR.((!file_exists(PS_MANU_IMG_DIR.'/'.(int)$manufacturer->id.'-medium.jpg')) ? $lang['iso_code'].'default' : (int)$manufacturer>id).'-medium.jpg';

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Dear friends

 

I've find solution for showing incorrect url for xml sitemap on Google Sitemap module v 2.1

after editing you can access xml sitemap url like http://mywebsite.com/sitemap.xml

 

I've checked it on PS v 1.5.3.1 for English Language.

It is working correctly.

 

Good Luck and Have a nice day. :)

If PS V 1.5.4.1 for English Language, What should i editing?

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

I am on PS 1.5.4.1 with Google sitemap 2.2.7 and there is a problem :

all is ok on live on the website but for Google there is the EAN code before the .html at the end of the link.

 

exemple :

http://www.my_website.com/category/ID-Product-Code_EAN.html

How delet the EAN code from the script ?

 

Tks.

Edited by lordbdp (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...