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

  1. taniav
    Posted 2 years 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?


  2. jrf
    Posted 2 years 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
    Posted 2 years 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
    Posted 2 years 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