Aleksey Popov Posted June 18, 2015 Share Posted June 18, 2015 Hello! Thanks for the module and could ask a question how can I exclude pages with certain templates? Or children of? Link to comment Share on other sites More sharing options...
tpr Posted June 18, 2015 Share Posted June 18, 2015 Using the current module you can not exclude, you should use my modified version, see the post above. Check the examples on the linked github page. 1 Link to comment Share on other sites More sharing options...
Aleksey Popov Posted June 18, 2015 Share Posted June 18, 2015 Aha, thank you. But I've used sitemap template instead. That's simple and flexible. Link to comment Share on other sites More sharing options...
tires Posted July 15, 2015 Share Posted July 15, 2015 Hi! I installed version 1.1.0. My site contains 12 pages. In the mydomain.com/sitmap.xml is just the startpage. Are there some modulesettins i have to change in order to get a correct sitemap? Thanks an regards! PS. I also tried the Ryans template solution for the sitemap. It also outputs just the startpage in the xml-sitemap. Whats my mistake? PPS. SORRY my mistake! A few parent sites were set to "hidden". After i set them to "visible" the xml-sitemap is fine! Link to comment Share on other sites More sharing options...
Neo Posted July 31, 2015 Share Posted July 31, 2015 Is there a way to exclude specific hidden pages from being excluded; i.e. include them in the sitemap? Link to comment Share on other sites More sharing options...
quickjeff Posted August 5, 2015 Share Posted August 5, 2015 I have installed this module however, I have some pages that are hidden from the navigation, in which I still want them added to the sitemap. I have added a checkbox field called sitemap. This field allows the user to add to the /sitemap page. Here is what I use for the sitemap template: foreach($page->children("include=hidden, sitemap=1") as $child) sitemapListPage($child); I need to do the same thing but for the sitemap module. I am having some trouble accomplishing this. Any help would be great. 1 Link to comment Share on other sites More sharing options...
Macrura Posted August 5, 2015 Share Posted August 5, 2015 @quickjeff - have you considered making a sitemap manually - then you would have api control over what it spits out: http://processwire.com/talk/topic/3846-how-do-i-create-a-sitemapxml/ 1 Link to comment Share on other sites More sharing options...
quickjeff Posted August 5, 2015 Share Posted August 5, 2015 @Macrura - Good point, already solved my problem! Thanks for the advice. I ended up just building my own template and following ryans advice. Was able to create an array that pin points the hidden pages I want included in the sitemap. Link to comment Share on other sites More sharing options...
Jason Huck Posted March 3, 2016 Share Posted March 3, 2016 I'm getting a 404 response when I hit mydomain.com/sitemap.xml. The sitemap data is there, and there are no errors. I understand that the module works by hooking into the 404 page, but I also see in the module code that the header is explicitly being reset to 200. This is an issue because Google Webmaster Tools won't accept the sitemap due to the 404 header. Any suggestions on how to debug this? I assume no one else is having this issue, so it's probably something unique with my setup, rather than an issue with the module itself, though I am not doing anything in my code to override the HTTP response code, to the best of my knowledge. Link to comment Share on other sites More sharing options...
quickjeff Posted March 3, 2016 Share Posted March 3, 2016 @Jason, To my understanding, you cannot see the xml file when you try to access the /sitemap.xml page ? If so, be sure the xml template settings in Processwire has no checked for, should page URLs end with a slash. That should get rid of the 404 and Google will pick up the xml, I have built multiple sites with this setup and all work well. Link to comment Share on other sites More sharing options...
Jason Huck Posted March 3, 2016 Share Posted March 3, 2016 I can see the XML, and it's correct, but the HTTP response code returned in the page headers is a 404 instead of a 200. Webmaster Tools complains about this and won't import the sitemap, even though the *body* of the response is fine. Link to comment Share on other sites More sharing options...
Jason Huck Posted March 3, 2016 Share Posted March 3, 2016 And now this afternoon, mysteriously, with no changes from me, it is returning a 200 and Webmaster Tools accepted it just fine. So, never mind, I guess... Link to comment Share on other sites More sharing options...
quickjeff Posted March 3, 2016 Share Posted March 3, 2016 @jason, glad to see its solved. Keep an eye on it, it should work. As mentioned, I have used this many times and it works like a champ! Link to comment Share on other sites More sharing options...
Peter Knight Posted March 24, 2016 Share Posted March 24, 2016 I'm currently getting a 404 when i try to access domain.tld/sitemap.xml Actually, that URL results in the address refreshing to http://sitemap.xml/ My 404 page template (which I believe this sitemap uses) has no trailing slash enabled so I don't think it's the same issue. Google WMT is telling me too that there's an issue with the sitemap. Any pointers on where to look? Link to comment Share on other sites More sharing options...
quickjeff Posted March 24, 2016 Share Posted March 24, 2016 Peter, Did you add a new template specifically for the xml template? If so, go to that template setting and remove the end with backslash. Link to comment Share on other sites More sharing options...
Peter Knight Posted March 24, 2016 Share Posted March 24, 2016 Did you add a new template specifically for the xml template? I seem to have a page called sitemap but the template it's based on is a generic basic page and not specifically a sitemap version. I can't recall where that page came from or why it was created as my understanding of this template is that you simply install it and it'll create the /sitemap.xml Just looked at my other sites with working sitemaps. None of them have dedicated sitemap templates or even pages with the admin or require those to work. Based on that, I'm a bit baffled. Link to comment Share on other sites More sharing options...
quickjeff Posted March 24, 2016 Share Posted March 24, 2016 Hi Peter, Sorry was confusing the discussion with another one. I would strongly suggest using the following solution, I have used it numerous times. https://processwire.com/talk/topic/3846-how-do-i-create-a-sitemapxml/ Link to comment Share on other sites More sharing options...
Peter Knight Posted March 28, 2016 Share Posted March 28, 2016 I'm currently getting a 404 when i try to access domain.tld/sitemap.xml Actually, that URL results in the address refreshing to http://sitemap.xml/ Hi guys. In case it's helpful for anyone to know, I solved this issue. Client had created an incorrect redirect using the JumpLinks module. 1 Link to comment Share on other sites More sharing options...
Lance O. Posted October 20, 2016 Share Posted October 20, 2016 Is there a way to force "www" on the links generated in the sitemap.xml file? Link to comment Share on other sites More sharing options...
Jason Huck Posted October 20, 2016 Share Posted October 20, 2016 3 hours ago, Lance O. said: Is there a way to force "www" on the links generated in the sitemap.xml file? Your web server should be configured to have a single canonical domain to avoid fragmentation of SEO and analytics, and your sitemap should use it. If the "www" version of the domain is canonical, requests for sitemap.xml will be redirected to that domain and the generated links should match. The module simply uses the value of $page->httpUrl. ProcessWire's .htaccess file includes directives for Apache to set a canonical domain, but they are commented out by default. Look around line 123: # ----------------------------------------------------------------------------------------------- # 13. OPTIONAL: Redirect users to the 'www.' version of the site (uncomment to enable). # For example: http://processwire.com/ would be redirected to http://www.processwire.com/ # ----------------------------------------------------------------------------------------------- # RewriteCond %{HTTP_HOST} !^www\. [NC] # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 3 Link to comment Share on other sites More sharing options...
Lance O. Posted October 20, 2016 Share Posted October 20, 2016 I should have mentioned that I already have those two lines commented out before I posted my question. But now that I check the sitemap.xml file again, the "www" has been added to the urls. Looks like it may have just been a caching issue. Thanks for your insight! Link to comment Share on other sites More sharing options...
mds Posted March 2, 2017 Share Posted March 2, 2017 On 19-3-2014 at 10:22 AM, kixe said: Update 29.02.16 This update is made for PW 3.0. To prevent endless redirects in 2.7 and lower please read instructions (comments). You need to comment out the line with the redirect.multilang-sitemap-xml.php.zip @kixe It doesn't seem to work for me on PW 3.0.47 This is the error I get: Error: Uncaught Error: Call to undefined function wire() in […]/www/site/templates/multilang-sitemap-xml.php:116 Link to comment Share on other sites More sharing options...
Peter Knight Posted August 13, 2017 Share Posted August 13, 2017 Hi Pete I have XML sitemap installed and it's listing my URLs as http://domain.com without the www The site is set (with .htaccess) to display with the www and this is working. IE any requests for http://domain.com deliver http://www.domain.com. So I'm not sure why it's picking this non www up or where it's coming from. Additionally, I've disabled ProCache, reinstalled the XML Sitemap Module checked that the source of the actual pages META tags are correct IE <link rel="canonical" href="http://www.domain.com" /> Any pointers appreciated. Pete - think this was a caching issue. All fixed now. Link to comment Share on other sites More sharing options...
Marco Angeli Posted September 25, 2018 Share Posted September 25, 2018 Hi, wonderful module, but I can't make it work for a multilanguage web site. I only get the results for the default language. Could anybody share their (working) solution? Link to comment Share on other sites More sharing options...
adrian Posted September 25, 2018 Share Posted September 25, 2018 2 hours ago, Marco Angeli said: Hi, wonderful module, but I can't make it work for a multilanguage web site. I only get the results for the default language. Could anybody share their (working) solution? Try @Mike Rockett's sitemap module: http://modules.processwire.com/modules/markup-sitemap/ 1 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