WordPress.org

Forums

Yoast SEO
[resolved] Sitemap XML Parsing Error on WP 3.7.1 (4 posts)

  1. taniav
    Member
    Posted 1 year ago #

    Sitemap was ok when I use WP 3.7. After I upgraded WP to 3.7.1, I thought everything was ok. However, when I checked sitemap on http://localhost/mysite/sitemap_index.xml, I got warning:

    XML Parsing Error: XML or text declaration not at start of entity
    Location: http://localhost/mysite/sitemap_index.xml
    Line Number 2, Column 1:<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="http://localhost/mysite/main-sitemap.xsl"?>
    ^

    What is wrong? Any thoughts on it?

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

  2. jrf
    Member
    Posted 1 year ago #

    Looks like something (your theme ? another plugin ?) is outputting a blank line before the WP SEO plugin starts sending the xml output.
    That's most likely what's causing this issue.

    Find the sender of the blank line, remove it & try again.

  3. taniav
    Member
    Posted 1 year ago #

    Hi jrf,

    Thank you for pointing me to the right direction. It turns out that there were extra blank lines at the end of my theme's functions.php.

    Everything works again! :)

  4. jrf
    Member
    Posted 1 year ago #

    Glad to hear it ;-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic