Problem generating the sitemap file using YOAST SEO plugin

WordPress Business Themes Forums Responsive Themes Micro Jobs Theme Problem generating the sitemap file using YOAST SEO plugin

Problem generating the sitemap file using YOAST SEO plugin

August 4, 2016
 Raul

  • Raul
    Newbie 24 points

    MJ theme: Version 8.9.1
    YOAST plugin: Version 3.4.1

    I have been unable to generate the site map file for my site. I googled around, and found a lot of forums where people are saying the issue is that a blank is being inserted somewhere by either the theme or a plugin. I turned off all the plugins, and still get the error. So there must be something wrong in the theme. I checked the functions.php looking for any spaces and eliminated all I found. Still, the issue persists.
    Has anyone had this issue?
    https://wordpress.org/support/topic/yoast-seo-xml-sitemap-error

    BELOW YOU CAN SEE THE LINK TO THE SITEMAP FILE, and the error.
    http://www.chiveando.com/sitemap_index.xml

    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.

    August 4, 2016 at 5:28 am

  • Raul
    Newbie 24 points

    I just did a quick test and version 8.9 and 8.9.3 work fine with YOAST and generate a site map easily. It must be the beta 8.9.1 has an blank somewhere in the theme.

    August 4, 2016 at 6:50 am
  • Hanif
    Hanif
    Newbie 16 points

    Please insert the following code in .htaccess file, this will fix the issue

    # Yoast SEO – XML Sitemap Rewrite Fix
    RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L]
    RewriteRule ^locations.kml$ /index.php?sitemap=wpseo_local_kml [L]
    RewriteRule ^geo_sitemap.xml$ /index.php?sitemap=geo [L]
    RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
    RewriteRule ^([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 [L]
    # END Yoast SEO – XML Sitemap Rewrite Fix

    August 4, 2016 at 7:26 am
  • Hanif
    Hanif
    Newbie 16 points

    If you want the latest updated plugin V3.4.0 of yoast you can download it from here :

    Yoast SEO Premium v3.4.0 – WordPress Seo Plugin Nulled

    August 4, 2016 at 7:28 am

  • Raul
    Newbie 24 points

    I discovered finally what was the problem. My site is in Spanish, and in the language file, I had two blank spaces after the closing php statement. This breaks YOAST’s sitemap function. I deleted the blank lines, and it works. So probably the beta 8.9.1 had no issues, it was my bad language file.

    August 5, 2016 at 12:12 am

  • Becca
    Newbie 39 points

    I have tried adding that code to my .htaccess file, disabling all my plugins and Yoast still does not list any single listing pages. I am having to manually add/remove a sitemap. Very frustrating. Has anyone else had this issue?

    September 23, 2017 at 12:34 pm
Viewing 6 posts - 1 through 6 (of 6 total)

Didn't find what you were after?

Chat with us now

or contact our support team