We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47630
    • 56 Posts
    Just tried to integrate the GoogleSiteMap extension & I'm getting the following error:

    This page contains the following errors:

    error on line 1 at column 9: XML declaration allowed only at the start of the document
    Below is a rendering of the page up to the first error.

    That is the sum content of the sitemap.xml page however, if I right click & show source code every page is listed here.

    This is the url to the sitemap;

    http://www.transport4u.my/sitemap.xml


    • I have created a resource called GoogleSiteMap.
    • xml is listed as content type.
    • alias is 'sitemap'.

    This is on a modX 2.2.14 site

    Anyone any idea how to fix this?
    or
    Does this need fixing?
      • 47630
      • 56 Posts
      I just tried registering this in google webmaster tools & received the message:

      Unsupported file format
      Your Sitemap does not appear to be in a supported format. Please ensure it meets our Sitemap guidelines and resubmit.

      So whatever the issue is I need to fix it :-(
        • 42046
        • 436 Posts
        The first line is:
        <p><?xml version="1.0" encoding="UTF-8"?>


        You have a stray p and /p at the start and end of the document. Turn off richtext and delete the p's.
          • 47630
          • 56 Posts
          Aaahh ok i can see that, i've unticked rich text in settings but I cannot delete the p's.

          Result = predictably still the same.

          I think i wrongly interpret where to put the [[!GoogleSiteMap]] call because I have put it into the content box of the sitemap resource page.

          If i go to html editor & delete the p's they do not delete, meaning i think i do something wrong.

          Where is the [[!GoogleSiteMap]] call supposed to go? Reading the document i thought it say in the resource page!!!
            • 42046
            • 436 Posts
            Go to the content box, make sure you're viewing the source and all it should contain is [[!GoogleSiteMap]]

            It looks like you've got
            <p>[[!GoogleSiteMap]]</p>
            because of pasting it into the richtext editor.
              • 47630
              • 56 Posts
              Hi Dan,

              Yes it is working now.

              What i changed was unticking 'toggle editor' & then when delete the p's they stayed deleted.

              The sitemap page appeared without errors but not in the format i expected (the view source page still shows how it should appear).

              However, I re-submitted the sitemap to google webmaster tools & it came up with no errors this time & 16 pages were registered.

              Thanks so much for your assistance it is appreciated smiley
                • 52255
                • 1 Posts
                1 Van 1 Man Removals Reply #7, 10 years, 4 months ago
                We are have the same problem, here is the link to the sitemap https://www.1van1man.com/sitemap.xml and the website is https://www.1van1man.com/
                  The Team@
                  1 Van 1 Man