WordPress.org

Support

Support » Plugins and Hacks » Yoast SEO » [Resolved] Sitemaps XML declaration allowed only at the start of the document

[Resolved] Sitemaps XML declaration allowed only at the start of the document

  • Hi,

    I have Yoast SEO installed on several sites on the same server – all are using the same .htaccess file.

    I installed the plugin on another site (same server) yesterday but have not been able to get the sitemaps to generate. I have tried uninstalling and re-installing Yoast.

    Either there is a file not found or I get this message:
    This page contains the following errors:

    error on line 19 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.

    BTW, there is no rendering of the page up to the first error.

    I have researched others with the same issue and don’t have any of the caching plugins that may have caused this type of problem in the past. I have checked functions.php and there are no blank lines.

    Any other ideas?

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • I just noticed that I am having the same type of issue on my site with Yoast SEO but I do not know if I had this error prior to the recent WP.org update.

    But I have it now and that is a problem. The error I get when click on XML SITEMAP button within Yoast SEO:

    Error loading stylesheet: An XSLT stylesheet does not have an XML mimetype:

    http://ladylovespinstripes.com/main-sitemap.xsl

    Please help me fix this as I do not even know where to begin here as I am not very good with this complicated techie stuff.

    Thank you.

    Any word from the developers on this?

    Cathy Tibbles

    @multitalentedmommy

    unfortunately one of my clients is also experiencing this issue

    OK, I tracked down the issue (in my case).

    I disabled all plugins – wasn’t the issue. Changed from child to parent theme and sitemaps worked.

    So you could switch themes to isolate the issue – if you aren’t using child themes.

    Many solution suggest checking for whitespace between the php tags in your theme files. I had done this previously but (I guess) not thoroughly enough. This took some time.

    Issue is resolved for me.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Sitemaps XML declaration allowed only at the start of the document’ is closed to new replies.
Skip to toolbar