We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8822
    • 203 Posts
    Hi, i am using GoogleSiteMap with Revo 2.2.9. I have installed the GoogleSiteMap package, created a resource with an alias sitemap.xml, assigned it 'no' template (or a blank one, have tried both) and added [[!GoogleSiteMap]] to the resource content. When i view the sitemap i get an empty urlset, i.e.

    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <urlset>
    
    </urlset>
    


    I have plenty of resources with a resource alias specified and have friendly URLs turned on - What am i doing wrong?
      • 42046
      • 436 Posts
      Have you got the resource content type set to xml?
        • 8822
        • 203 Posts
        yep, resource content type is set to xml. The resource alias is sitemap.xml, but to prevent it from appearing as sitemap.xml.xml, i removed the .xml extension from the xml content type (under the menu System/Content Types) - i did try it the other way too, by having only 'sitemap' in the resource alias and keeping the .xml content type extension, but it didn't make any difference.....
          • 10487 MODX Staff
          • 1,535 Posts
          Hi, are you trying to view the site map in the browser? Some browsers can have issues with displaying XML output, I would check the output via View Source or equivalent. You might find the output is fine.
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 8822
            • 203 Posts
            Hi Garry, thanks for your response. I did check the source and it displayed exactly what was displayed through the browser :-(
            Any more ideas anyone?
              • 42046
              • 436 Posts
              Have you made the chunks as described in the documentation?

              http://rtfm.modx.com/extras/revo/googlesitemap/googlesitemap.googlesitemap
                • 8822
                • 203 Posts
                Hi Dan, yes - i have the following chunks defined:

                itemTpl
                <url>
                    <loc>[[+url]]</loc>
                    <lastmod>[[+date]]</lastmod>
                    <changefreq>[[+update]]</changefreq>
                    <priority>[[+priority]]</priority>
                </url>


                containerTpl
                <urlset xmlns="[[+schema]]">
                [[+items]]
                </urlset>


                A question though - i assumed that itemTpl and containerTpl were the default chunks installed with GoogleSiteMap, the documentation is a little ambiguous and the examples given do not include any reference to any templates? Perhaps i should rename them and reference them in the GoogleSiteMap call, currently i only have: [[!GoogleSiteMap]]. Any suggestions?
                  • 8822
                  • 203 Posts
                  I really need to get GoogleSiteMap working on my website - any suggestions to the above?
                    • 22775
                    • 15 Posts
                    My working containerTpl looks like this:

                    <?xml version="1.0" encoding="UTF-8"?>
                    <urlset xmlns="[[+schema]]">
                    [[+items]]
                    </urlset>
                    [ed. note: patstar last edited this post 12 years, 10 months ago.]