WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
XML sitemap putting out parsing error (12 posts)

  1. spencerpad
    Member
    Posted 1 year ago #

    I just says:

    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.

    I have tried saving permalinks, disabling and re enabling the sitemap.

    I haven't tried disabling the plugin because I don't want to lose all my settings. Any ideas?

    You can see my sitemap here:
    http://www.michaelpadway.com/sitemap_index.xml

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. spencerpad
    Member
    Posted 1 year ago #

    Scratch that, I deactivated/reactivated and it didn't work. WordPress 3.5 and an up to date WordPress SEO plugin.

  3. fmgguy
    Member
    Posted 1 year ago #

    Having this same problem as well. Would love to know a fix. You can see my error here:
    http://www.kateryanskincare.com/sitemap_index.xml

    XML Parsing Error: XML or text declaration not at start of entity
    Location: http://www.kateryanskincare.com/sitemap_index.xml
    Line Number 2, Column 1:

  4. spencerpad
    Member
    Posted 1 year ago #

    I think this is new with the latest version of wordpress SEO, I wonder if there is a way to rollback?

  5. fmgguy
    Member
    Posted 1 year ago #

    You can rollback by manually downloading a previous version (see link below), and replacing the new one in your plugins folder.

    http://wordpress.org/extend/plugins/wordpress-seo/developers/

  6. spencerpad
    Member
    Posted 1 year ago #

    FMGguy, I have found the problem, however I have not figured out how to solve it yet.
    Something in my theme (it works with other themes) somehow adds one line of space in the beginning of sitemap_index.xml, causing the error. After testing it in Google, it still reads it.
    That said, if we can figure out how to remove the space it will work.

  7. rrhobbs
    Member
    Posted 1 year ago #

    This has been an ongoing problem for me intermittently thru many versions of WP-SEO. I eventually turned the sitemap option off and installed Site Tree plugin; there are a number of other sitemap plugins as well.

  8. Andy Fragen
    Member
    Posted 1 year ago #

    The added whitespace might be from any plugin or functions.php file that has a space outside of <?php ... ?>. That's where if found it n a plugin I wrote that gave me this error. Fixing the whitespace fixed the problem here.

  9. Andy Fragen
    Member
    Posted 1 year ago #

    404 error was fixed after resaving permalinks.

  10. fmgguy
    Member
    Posted 1 year ago #

    Hey Andy, thanks much for letting us know about that spacing issue. Removing one space outside the PHP tags on my function file fixed it. Awesome!

  11. spencerpad
    Member
    Posted 1 year ago #

    Thanks for the advice. So far I haven't been so lucky, I have looked through just about every document on my site trying to find the whitespace. Does anyone have any debugging tips on finding a hard to identify whitespace?

  12. Majestor
    Member
    Posted 1 year ago #

    Look in your include functions if u have. i just fixed it because of one space to in a sidebars.php.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic