We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17340
    • 70 Posts
    Thanks Susan, what would my MODx-life be without you ..?

    Indeed, switching the Template to blank provided the expected result, albeit not by doing the your-domain/sitemap.xml, but by choosing the preview option from the MODx-manager menu.
    a nice list of actual pages with their location and <lastmod> dates in the directory.

    for the site I’m working on I installed ListSiteMap and made my contact happy, I’ll install the searchmachine sitemap later once it has become a production site.
    thanks again
    lmv
      • 32645
      • 377 Posts
      Hi there.

      I get a problem with the Sitemap Snippet - it keeps saying there’s a XML Parsing error;


      XML Parsing Error: syntax error
      Location: http://ipaddress/index.php?id=84
      Line Number 1, Column 1:[[SiteMap? &format=`sp` &excludeTV=`tv_sitemap_exclude`]]
      ^

      My sitemap.xml file is just a blank page with the following call;

      [!SiteMap? &format=`sp` &excludeTV=`tv_sitemap_exclude`!]
      


      Notes;
      Cache is off,
      rich text is off,
      cache is cleared,
      Content type is text/xml
      AddType application/xml .xsl is my htaccess file.

      Why does error keep appearing?
        • 3177
        • 137 Posts
        Quote from: worchyld at Feb 08, 2008, 06:19 AM


        My sitemap.xml file is just a blank page with the following call;

        [!SiteMap? &format=`sp` &excludeTV=`tv_sitemap_exclude`!]
        



        Hello worchyld,

        Since the value ’sp’ is default for format variable and excludeTV is extra, could you try the
        call without any params and let us know the results

        [!SiteMap!]
        




          • 32645
          • 377 Posts
          Hi there.

          I did what you said, and I still get the same error.


          XML Parsing Error: syntax error
          Location: http://ipaddress/index.php?id=84
          Line Number 1, Column 1:[[SiteMap]]
          ^

          I’m going to try and download the Sitemap snippet again, or see if there were any updates and try again. I really don’t know why this error keeps appearing, or how to fix it though.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Does your document its template set to "none"?
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 3177
              • 137 Posts
              Hm, that is strange. What’s more, your error says "Line 1 number 1:[[Sitemap]]"
              This seems to imply that your MODX installation cannot interpret the snippet call.
              So, this might have nothing to do with this snippet, but with snippets as a whole.

              Questions:
              - Do you have more snippets in your application?
              - Could you call other snippets (eg: eform) as a test
              - Can you create a new snippet and call that.
              Contents of the snippet:
              <?php
                  print "<h1>Hello World</h1>";
              ?>
              

              Call this snippet someting like ’mysnippet’
              and call it somewhere in your code with the following call:
                [[mysnippet]]
              


              Maybe this sheds some light on the problem.

              Bert

                • 32645
                • 377 Posts
                I think I’ve solved it.

                I think it was just a simple case of the snippet name being in lowercase (groans)

                I did the following;

                1. Re-downloaded the snippet and copy/pasted the version via the resources page on Modx.
                2. Cleared cache
                3. Made sure the page is "(blank)" which is empty, and made sure the page was not caching, and has not got a richtext editor switched on.
                4. I changed the snippet call to [[sitemap]] and it worked fine.
                5. Then I realised that the snippet name is in "lowercase" and not in mixed-case, like "[!SiteMap!]".
                6. Re-posted my old code [!sitemap? &format=`sp` &excludeTV=`tv_sitemap_exclude`!] but in lowercase.
                7. It worked.

                The XML throws no errors and displays it as expected.
                  • 3177
                  • 137 Posts
                  Ok, good!!!
                  However, strange error message. You would expect something like
                  ’snippet not found’ error and not a syntax error from XML.
                    • 8894
                    • 114 Posts
                    Hello all,

                    It seems that this useful modification about non searchable documents hadn’t be taken into account, so i posted it as a new release into the repository.
                      • 21056
                      • 327 Posts
                      Quote from: bertcatsburg at Dec 26, 2007, 04:44 PM

                      I took the liberty to create a version 1.0.4 of this snippet.
                      What I added was a display option called ’ulli’. This creates the
                      sitemap as an Unordered list (<ul><li> structure) containing
                      links to the document and the pagename as the text of the link.
                      Next step, but not yet implemented, is the option to sort the
                      docs on ’menu index’ and display the ul-li tree in multilevel
                      according to the document tree. (Will be version 1.0.4-2 wink )

                      Could you not just use a Wayfinder call, which does exactly this out of the box?
                        Author: ManagerManager plugin - customise your ModX manager interface

                        Rckt - web development, Sheffield, UK