Ben90 Posted October 9, 2016 Share Posted October 9, 2016 (edited) Hi, I realise Google Sitemap module write homepage 2 times with 2 different prorities. The version that I'm using is Google sitemap v3.2.0 I can edit it manually in XML file but that means I can't use Cron Task to update it automatically (unless I want to edit it every single time manually just to remove that duplication). How can I fix it? Or is there a better XML module than the default one? I thank you in advance. Edited October 9, 2016 by Ben90 (see edit history) Link to comment Share on other sites More sharing options...
lonelyadmin Posted December 14, 2016 Share Posted December 14, 2016 Hi, to resolve this issue. on the Configuration page of Google Sitemap module, there is this option: Indicate the pages that you do not want to include in your Sitemaps file: tick the Index and then re-generate it, you will see just one homepage (Index) entry on the sitemap file HTH Indicate the pages that you do not want to include in your Sitemaps file: Link to comment Share on other sites More sharing options...
mistify34 Posted December 16, 2016 Share Posted December 16, 2016 (edited) Hi, I have the same issue but tick the index is not the solution. Thanks for the solution. I have another issue, the category ID 2 (home) is write on the sitemap but it's a html 404... How to delete this link from the sitemap ? A solution is to override the gsitemap module and exclude the category ID 2 but i want to find a better solution. Best regards Edited December 16, 2016 by mistify34 (see edit history) Link to comment Share on other sites More sharing options...
JohanLarsson26 Posted November 18, 2017 Share Posted November 18, 2017 (edited) I have the same issue. Someone know how to fix this? I found the solution. Select the index page in the module. Edited November 18, 2017 by JohanLarsson26 (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted November 19, 2017 Share Posted November 19, 2017 On 12/16/2016 at 5:50 AM, mistify34 said: I have another issue, the category ID 2 (home) is write on the sitemap but it's a html 404... Perhaps the question to ask is why do you have a home category as ID 2. Did you attempt to create a new home category? Link to comment Share on other sites More sharing options...
Frankie M Posted February 28, 2018 Share Posted February 28, 2018 Hi, I have the same problem! It doesn't matter whether I select or deselect the index in the google sitemap module, I keep getting a /2-home url in my sitemap. Also I noticed I have double entries for some url friendly links. One exists and the other doesn't: <url><loc>https://www.mywebsite.nl/12-friendly url</loc><priority>0.8</priority><lastmod>2015-07-04T13:19:36+02:00</lastmod><changefreq>daily</changefreq></url> <url><loc>https://www.mywebsite.nl/28-friendly url</loc><priority>0.8</priority><lastmod>2015-10-31T11:44:06+01:00</lastmod><changefreq>daily</changefreq></url> The /2-home url results in a 404 page. The /12-friendly url gives an empty page with no products. Did somebody already found a solutions? I get index errors from Google Search Console. BR Frank Link to comment Share on other sites More sharing options...
ANGELO Vintage Posted June 11, 2018 Share Posted June 11, 2018 (edited) prestashop 1.6.1.18 and i've the same 2-home issue in the sitemap in both language it cerates this 404 page. ther is a report on the forge too: http://forge.prestashop.com/browse/PNM-3890 There is a solution? Edited June 11, 2018 by ANGELO Vintage (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted June 13, 2018 Share Posted June 13, 2018 For both of you.... Perhaps the question to ask is why do you have a home category as ID 2. Did you attempt to create a new home category? Link to comment Share on other sites More sharing options...
Frankie M Posted June 13, 2018 Share Posted June 13, 2018 8 hours ago, bellini13 said: For both of you.... Perhaps the question to ask is why do you have a home category as ID 2. Did you attempt to create a new home category? No I did not. Some how generating the sitemap gives you a double home category. Any clues where to look? Link to comment Share on other sites More sharing options...
bellini13 Posted June 14, 2018 Share Posted June 14, 2018 Or do you have a Home category with ID 2, and that is why you are getting the errant sitemap? Since we are talking about Categories, you might start with confirming what your Categories look like and what is the ID of the Home category. Link to comment Share on other sites More sharing options...
Frankie M Posted June 18, 2018 Share Posted June 18, 2018 On 14-6-2018 at 12:52 PM, bellini13 said: Or do you have a Home category with ID 2, and that is why you are getting the errant sitemap? Since we are talking about Categories, you might start with confirming what your Categories look like and what is the ID of the Home category. I didn't create any home category. Anyway, I managed to get rid of this id 2 home page by changing gsitemap.php in the gsitemap module folder. Somewhere around line 440: foreach ($categories_id as $category_id) { //remove 2-Home category link from sitemap, because the link gives 404 error if((int)$category_id['id_category'] == 2) // id = 2 is Home category { continue; } $category = new Category((int)$category_id['id_category'], (int)$lang['id_lang']); $url = $link->getCategoryLink($category, urlencode($category->link_rewrite), (int)$lang['id_lang']); 2 Link to comment Share on other sites More sharing options...
bellini13 Posted June 22, 2018 Share Posted June 22, 2018 On 6/18/2018 at 7:02 AM, Frankie M said: I didn't create any home category. Thats not what I asked you. Is it that difficult to visit the Category page in your back office, and confirm what the Home category ID is? Link to comment Share on other sites More sharing options...
Frankie M Posted June 23, 2018 Share Posted June 23, 2018 19 hours ago, bellini13 said: Thats not what I asked you. Is it that difficult to visit the Category page in your back office, and confirm what the Home category ID is? I did look at the categories. But there isn't any. And since I made the changes to gsitemap.php in the gsitemap module folder the sitemap does not show any home category anymore. For me this is solved. Link to comment Share on other sites More sharing options...
bellini13 Posted June 30, 2018 Share Posted June 30, 2018 On 6/23/2018 at 3:47 AM, Frankie M said: I did look at the categories. But there isn't any. And since I made the changes to gsitemap.php in the gsitemap module folder the sitemap does not show any home category anymore. For me this is solved. That makes no sense. You looked at your categories and you have none? Link to comment Share on other sites More sharing options...
ANGELO Vintage Posted December 31, 2018 Share Posted December 31, 2018 On 6/13/2018 at 1:00 PM, bellini13 said: For both of you.... Perhaps the question to ask is why do you have a home category as ID 2. Did you attempt to create a new home category? no i did not create any other homepages looking inside Categories i've these only: https://gyazo.com/991207431fdc5c55af042445e386c2a3 Link to comment Share on other sites More sharing options...
jose_ugs Posted January 9, 2019 Share Posted January 9, 2019 Same thing here, Presta 1.6.1.18, Google sitemap v3.2.1, Categories with IDs: 12, 36, etc... none with an ID of 2... But! Checking my DB, there's something interesting: ps_category_shop There is a category with ID 2... Some more digging inside ps_category_lang And then this is ps_category I dont get this Link to comment Share on other sites More sharing options...
DebraGTS Posted March 4, 2020 Share Posted March 4, 2020 On 6/18/2018 at 7:02 AM, Frankie M said: I didn't create any home category. Anyway, I managed to get rid of this id 2 home page by changing gsitemap.php in the gsitemap module folder. Somewhere around line 440: foreach ($categories_id as $category_id) { //remove 2-Home category link from sitemap, because the link gives 404 error if((int)$category_id['id_category'] == 2) // id = 2 is Home category { continue; } $category = new Category((int)$category_id['id_category'], (int)$lang['id_lang']); $url = $link->getCategoryLink($category, urlencode($category->link_rewrite), (int)$lang['id_lang']); This worked for me. Thanks! Link to comment Share on other sites More sharing options...
itascaleathergoods Posted December 8, 2020 Share Posted December 8, 2020 Editing gsitemap.php as suggested worked for me as well. 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