We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4310
    • 2,310 Posts
    Looks like your blog & shop are not MODx, so the sitemap snippet doesn’t know about them.
    You could create a couple of web-links pointing to them.
      • 13632
      • 22 Posts
      Hi all,

      I’ve been trying to add this snippit to our site but running on ModX v1.0.3 but can’t figure out why I’m getting this message when I view the map....

      The XML page cannot be displayed
      Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


      --------------------------------------------------------------------------------

      XML document must have a top level element. Error processing resource ’http://www.wereinstitches.co.uk/index.php?id=55’.

      I followed all the instructions, Furl’s are on and the alias is set to ’sitemap.xml’. Also I have tryed both methods mentioned in the instructions... calling snippit from the page set to a blank template and calling it from the blank template, I even tried useing the ’minimal template’ but still get the same error. :’(

      Any help would be most welcome.

      Thanks J
        • 4310
        • 2,310 Posts
        For the document page settings do you have the content type set to text/xml?
          • 13632
          • 22 Posts
          Hi bunk58,

          Yes, the content type set is to text/xml and published.

          Thanks J
            • 4310
            • 2,310 Posts
            If you want to send me a PM with the login details I can have a quick look.
            No guarantees of success though wink
              • 13632
              • 22 Posts
              PM sent
              Thanks J
                • 25273
                • 13 Posts
                Hi,

                I know this is a longshot but. . .

                The snippit does not seem to be including my blog posts. I have searched this forum and come up with a similar problem - but it was a long time ago and I am using the updated 1.0.9-GA version.


                Quote from: gadamiak at Jan 24, 2007, 02:11 PM

                Quote from: ricardosanX at Jan 24, 2007, 11:42 AM

                Is there any way to get this Snippet to display pages that are nested within Unpublished folders. My blog pages are accessed via the Ditto Snippet, so are inside an Unpublished folder.

                Try this:

                <?php
                # @line 119
                if (!$doc[$excludeTV]) // remove
                if (!$doc[$excludeTV] && $doc['published'] && $doc['template']!=0) // add
                
                # @line 198
                $docs = $modx->getActiveChildren($startid,'menuindex','asc','id,editedon,template'); //remove
                $docs = $modx->getAllChildren($startid,'menuindex','asc','id,editedon,template,published'); // add
                
                # @line 206
                if ($modx->getActiveChildren($id)) // remove
                if ($modx->getAllChildren($id)) // add
                ?>


                The change includes also filtering out documents with no template inteded for weblinks.


                Will changinging the code for getActiveChildren($id) to getAllChildren($id) work in the current version? (The code change for line 119 as given in the quote seems to have already been amalgamated into the latest version.)

                Any comments or advice is greatly welcomed.
                  • 12542
                  • 7 Posts
                  Using the url alias sitemap.xml I cannot access this from my-domain\sitemap.xml.

                  "The requested URL /sitemap.xml was not found on this server"

                  What am I missing?
                    • 12542
                    • 7 Posts
                    Quote from: i2Paq at Sep 24, 2010, 08:46 AM

                    Using the url alias sitemap.xml I cannot access this from my-domain\sitemap.xml.

                    "The requested URL /sitemap.xml was not found on this server"

                    What am I missing?

                    Wauw, 3 days and not even 1 reply......

                    To answer my own question: Friendly urls where not configured.
                      • 25368
                      • 6 Posts
                      Hi all !

                      I tryed sitemap snippet without success. I sure I’m so close but... sad

                      I don’t know if it’s because I’m running MODx Revolution under MAMP, but...

                      Grad, on the Wiki page, maybe you should add several things for the Newbies :
                      - Say that it works only on MODx Revolution
                      - Explain shortly the installation of sitemap as a snippet in MODx revolution with the name in lowercases : "sitemap"
                      - change the piece of code you provided for the right one under Revolution (I think it is [[!sitemap? &format=`sp`]], but am I right ?)
                      - Explain that you have to choose "XML" not "text/xml" (because there isn’t such an option) under Page Settings > Content Type.
                      - And re-read this superb documentation to see if you haven’t forgotten something that would make newbies to fail. All is too simple for you developers... smiley

                      I notice a last thing that made me crazy for a while : the "//<?php" at the beginning of the file. Do I need to remove "//" or not ? I don’t see the php ending tag, is it normal also ?

                      I didn’t understand the procedure to read the file on a browser to check if it’s ok neither... :-((

                      Sorry if it sounds completely silly but all this prevent me from succeeding beacause all I get is a blank page. When I save it I got just a html-like heading and nothing inside...

                      My config : Mac OS X 10.6.6 - MAMP 1.9.1 - MODx Revo 2.0.4

                      Hope this help newbies like me...

                      Thank you ! smiley
                        Roderic MEGE

                        Music Producer [Creation - Production - Mixing - Mastering - Consulting ]
                        Apple & Pro Audio Specialist


                        ...just remember that French music is fabulous