printerink Posted January 31, 2014 Share Posted January 31, 2014 Hi.., finally I have got the Google Sitemap to work.. hmm. mysite/1_index_sitemap.xmlmysite/1_e_0_sitemap.xml (which is for categories)mysite/1_en_1_sitemap.xml (which is for products) The {mysite/1_e_0_sitemap.xml (which is for categories)} is fine with NO .html at the end of the URL The {mysite/1_en_1_sitemap.xml (which is for products)} is NOT as it puts a .html at the end of the URL The actual URL of the product on my site in the browser does not show a .html For Example mysite/category/1-product as opposed to mysite/category/1-product.html So the all powerful Google robots tell me that it cannot locate mysite/category/1-product.html because it does not exist. I assume it has something to do with friendly URLs.., or not.., I do not know sadly.., Please how do I resolve this issue anyone? Thank you. Link to comment Share on other sites More sharing options...
NemoPS Posted January 31, 2014 Share Posted January 31, 2014 Weird, you used the google sitemap module? I assume you removed the .html extension from the seo and urls config page, on products? Link to comment Share on other sites More sharing options...
printerink Posted January 31, 2014 Author Share Posted January 31, 2014 Thank you for your reply Nemops.., but I cannot seem to locate the page where I can "remove the .html extension from the seo and urls config page, on products?" Unless it is if you mean in the "Schema of URLs" i.e. ROUTE TO PRODUCTS - {category:/}{id}-{rewrite}{-:ean13} I do not have any .html extensions on any of the "ROUTE TOs" if you know what I mean. Link to comment Share on other sites More sharing options...
NemoPS Posted February 1, 2014 Share Posted February 1, 2014 Yes, that's the one. What is the version of your google sitemap module? As I assume yo use that one Link to comment Share on other sites More sharing options...
printerink Posted February 1, 2014 Author Share Posted February 1, 2014 Hi Nemo I am using presta 1.5.4.1 and the Google sitemap is 2.3.2 Link to comment Share on other sites More sharing options...
printerink Posted February 1, 2014 Author Share Posted February 1, 2014 P.S. By the way I have recently purchased your Step Search module and installed it on my other site and I must congratulate you.., WHAT A GREAT MODULE. *****Top notch *****A1 ****Highly Recommended***** Link to comment Share on other sites More sharing options...
printerink Posted February 1, 2014 Author Share Posted February 1, 2014 My apologies it is the other way round..hmm mysite/1_e_0_sitemap.xml (is for products) mysite/1_en_1_sitemap.xml (is for categories) Therefore the {mysite/1_e_0_sitemap.xml (which is for products)} is the ISSUE as it puts a .html at the end of the URL Link to comment Share on other sites More sharing options...
NemoPS Posted February 3, 2014 Share Posted February 3, 2014 hm. Try inspecting around line 311 of the module's php file $url = $link->getProductLink($product, $product->link_rewrite, htmlspecialchars(strip_tags($product->category)), $product->ean13, (int)$lang['id_lang'], (int)$this->context->shop->id, 0, true); This gets the product url. After this, use die($url) to see what's being generated. Link to comment Share on other sites More sharing options...
printerink Posted February 4, 2014 Author Share Posted February 4, 2014 Thank you Nemo1 but what exactly do you mean.., How do I "use die($url) to see what's being generated" Link to comment Share on other sites More sharing options...
printerink Posted February 4, 2014 Author Share Posted February 4, 2014 I just inspected line 311 as you suggested and it is exactly the same i.e. $url = $link->getProductLink($product, $product->link_rewrite, htmlspecialchars(strip_tags($product->category)), $product->ean13, (int)$lang['id_lang'], (int)$this->context->shop->id, 0, true); but I do not know what you mean when you say "use die($url) to see what's being generated" Link to comment Share on other sites More sharing options...
NemoPS Posted February 4, 2014 Share Posted February 4, 2014 right after that $url variable, write die($url); The script will die displaying the link it's been generated Link to comment Share on other sites More sharing options...
printerink Posted February 5, 2014 Author Share Posted February 5, 2014 Do you mean like this. $url = $link->getProductLink($product, $product->link_rewrite, htmlspecialchars(strip_tags($product->category)), $product->ean13, (int)$lang['id_lang'], (int)$this->context->shop->id, 0, true);die($url); Link to comment Share on other sites More sharing options...
NemoPS Posted February 5, 2014 Share Posted February 5, 2014 yeah, so you know if the problem is there, or somehwere else Link to comment Share on other sites More sharing options...
printerink Posted February 5, 2014 Author Share Posted February 5, 2014 Sorry to trouble you again Nemo1..., and thank you so much for your assistance.., so I put the die($url); into the script and then just run the sitemap as you would normally from the back office.., or can you just test this particular variable another or easier way? Link to comment Share on other sites More sharing options...
printerink Posted February 16, 2014 Author Share Posted February 16, 2014 To all those Prestashop users out there who are frustrated and struggling with this issue. The version of Classes/Dispatcher.php which was causing the problem was in presta 1.5.4.1 .... I made the recommended changes etc. which were suggested on the forum and also those suggested in forge with no success. Ultimately I removed Classes/Dispatcher.php and installed the Classes/Dispatcher.php from Prestashop version 1.5.5.0 which seems to have solved the problem. What ramification this may have in future I do not know...but so far so good. So for now I will mark this as solved. Link to comment Share on other sites More sharing options...
Guest Posted July 16, 2015 Share Posted July 16, 2015 In my case the problem was not the bug in gsitemap module, but in override. The links for products were created with html path even when I reinstalled module, updated classes, etc. Thing is, that in SEO&URL admin tab you set paths which are overriten by Dispatcher override (that was my case. Just set same paths for all items in Dispather.php as you have in SEO&URL admin tab and it'd be ok. Anyway, that did the trick for me and hope it could help you too. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now