• Hi!

    My WP version is 3.5.2 and I use the last version of WordPress SEO by Yoast.

    I have problem with /page-sitemap.xml

    and error message is:

    XML Parsing Error: syntax error
    Location: https://www.mediadesign.bg/page-sitemap.xml
    Line Number 1, Column 1:
    2c35
    ^

    for this site.

    On the other sites, errors are the same but only numbers are different , instead of all sitemaps – page, post, category and etc.

    For example:
    Line Number 1, Column 1:
    15e1b
    ^

    How to fix this problem?

Viewing 15 replies - 1 through 15 (of 31 total)
  • Hi,
    I have a similar problem. After clicking on the Sitemap button in the sitemap-admin-page to view the sitemap I am getting:

    “error on line 3 at column 6: XML declaration allowed only at the start of the document”

    in Chrome and Firefox.

    I’m having this same issue, is this still something to do with some white spacing in the themes functions.php file?

    Found a possible workaround: Limit the number of entries displayed per sitemap-page. You can adjust this via Yoast -> SEO -> XML-Sitemap and enter a number in the field at the bottom. 25 worked for me.

    A recap of my problem: Ran into the same as Tony. Only page-sitemap.xml echoed this strange error (or more explicit: a leading number, so that the xml would fail to parse).
    Due to this limited error, I suspected the page-content to be faulty. After some checks I was able to rule this out. So I exported the whole content and uploaded it to another of my test system (with another hoster): Et voila, everything was perfectly fine.
    So my conclusion: I guess the max_execution_time lead to this error. On my live system (where the error occured) the max_exec. is 30. On my test server 60.

    So limiting the displayed items solved the problem for me. Please try this yourself and give some feedback to my workaround.

    I tried the suggestion (set to 25 as well) and that did not work… I have thee network version of WP installed.

    BTW… last time I checked it (oh, say a month or so ago), it worked fine.

    I get this message on my sites….

    This page contains the following errors:

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

    Perhaps an even lower value is needed for your hoster? Just for fun try setting it to 5. If its working, try bumping this up step by step. If its still broken I withdraw my workaround.

    I really appreciate the quick response. Unfortunately, changing this to 5 did not matter.

    I will upgrade WordPress to 3.6 this weekend, just to be sure, but as I said.. It worked fine a month ago… and I am only at the previous release, not way back.

    I don’t believe it’s a WP version issue due to the fact that I have several other blogs and the XML sitemap works fine. I ended disabling the sitemap feature and installed BWP Google XML Sitemaps a light XML sitemap plugin and all good now. I couldn’t figure out why it was giving that line error and I no time to figure troubleshoot… I had to start dumping my sitemaps to Google webmaster tools. Might be a quick solution for some of you who need your site indexed ASAP.

    I just installed the Google Sitemap generator from Arne Bachthold. Same error message(!), then I installed BWP Google XML Sitemaps and Google sitemap plugin, both work fine, but produce not all entries.
    Then I tested everything locally on Xampp. No errors, but my local WP version is 3.5 and has only 1,600 entries. That leaves the WP version or the execution time, which is 300 ms on my Xampp.

    When the error occured on my website, WordPress 3.5 was up and running. So I’m still tending to point at the execution time.

    Perhaps Yoast is capturing the entries for the sitemap in a different, far more execution time expensive way than the other plugins?

    @crashguru: Did you try my suggestion reducing the number of entries in Yoast? I’m still pretty convinced of this as a possible solution.

    @webcheck: No, I didnt reduce the number of entries. My sitemap should have about 72,000 entries, if it works properly. With Yoast’s sitemap it shouldnt be more than 50! I find it interesting though, that all these sitemap plugins produce the same error message. May be the message is correct? I have to find a different solution to my problem.

    This is getting pretty frustrating… I tried a couple other sitemap generators and this is still the message…

    Could there be some conflicting plugin? Is WordPress causing an issue? Ugh!

    Thread Starter Media Design

    (@tonyweb)

    Hi there! I also tried to change number of limit to 25, but no take any effects. Then changed to 20 and then to 15,10,5 aslo 50 … but not working for me.

    After that I increased max_execution_time from 30 to 60 sec. and this no get positive result.

    May be I will wait for compatible version of Yoast plugin with WP 3.6

    There might be two issues here involved:
    The sitemap must not have more than 50.000 entries and max. file size 10MB.
    @patter38: Did you upgrade to WP 3.6?

    I do not believe it is a size issue… I played with a couple other SiteMap programs (needing to completely disable the Yoast plugin, (not just it’s sitemap generator).

    Interesting, the other programs had the same problem… one difference, though, was that I was able to view the source on the other ones… and I noticed the first line was blank. The error says “XML declaration allowed only at the start of the document”.

    I wonder if WordPress or a stray plugin is putting in the blank line… I have disable many plugins (not all… I just can’t)… and have not fund the problem child…

    www.remarpro.com… help! As a multi-user site I have several clients now with Sitemap issues…

    Well, the 50,000 # is a RULE from Google. Did you upgrade to WP 3.6?

Viewing 15 replies - 1 through 15 (of 31 total)
  • The topic ‘XML Parsing Error – syntax error’ is closed to new replies.