• I updated yoast SEO plugin yesterday and suddenly started getting blank page for sitemap_index.xml

    Although when i tested main and child xml files on google webmaster tool (using add/test sitemap), there wasn’t any error.

    Can you tell me what went wrong ?

    Note I use w3 total cache – tried doing on/off, changed .htaccess rule, changed yoast seo inc/class-sitemap.php replace init() function but nothing worked..

    https://www.ads-software.com/plugins/wordpress-seo/

Viewing 11 replies - 1 through 11 (of 11 total)
  • xml files are invisible in browsers unless they have a valid stylesheet. Since google can read it, its not actually the sitemap file itself that has a problem, but the stylesheet (or the xml file has something wrong in the bit that names the stylesheet).

    Thats still an error, but not one that most would worry too much about (or even notice). If you still want to see the stylesheet, use the browser’s ‘view page source’ function (on the right click menu in Windows versions of firefox).

    Same problem, blank page … my wordpress is a subfolder

    page source does not show any links of course

    Going back to version 1.4.7 for now, the best …

    On the other hand, all other Yoast seems to work, at least on one of our small WordPress installations, just a problem with the sitemap.

    i just used the Google Webmaster tool to test the sitemap index, it found no problem (even if I can’t see it in the Yoast application frontend).

    Now testing with Bing …

    Will continue to observe before I jump to another sitemap generator. I don’t mind not seeing anything through the Yoast application, as long as Google and Bing recognize it.

    Ok, looks like Google and Bing are not complaining. WordPress SEO cron also working, I made a change in a post, and I saw the cron start to recreate sitemap and ping search engines.

    It is just that when clicking on the XML Sitemap box under Yoast, it shows a blank screen unlike in the old version 1.4.7.

    In the old code, it had this, notice the href pointing to the css folder:
    <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="https://www.lyrics-soundart.com/lyrics-news/wp-content/plugins/wordpress-seo/css/xml-sitemap-xsl.php"?>

    In 1.4.15, it has this :
    <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="https://www.lyrics-soundart.com/lyrics-news/main-sitemap.xsl"?>

    There is no such file as main-sitemap.xsl in the directory specified of course.

    WordPress SEO gurus, what should be done ? Thanks ??

    Ok, I think Yoast forgot to do something or include the file …

    I went to css directory, copied xml-sitemap.xsl to main-sitemap.xsl in the wordpress home directory.

    Refresh browser, voila, now it can be seen :

    https://www.lyrics-soundart.com/lyrics-news/sitemap_index.xml

    There is another interesting file in css directory, xml-video-sitemap.xsl.

    I wonder what to do with this …

    Anyway, I think I can confidently update our bigger WordPress installation now to ver 1.4.15

    p.s. I use W3TC too, it has nothing to do with W3TC

    I tried different things but finally gave up. As mentioned disabling W3TC did nothing so I ended up just doing a symbolic link of the XSL file which I think might work better long term than just copying the file.

    Below you can find instructions on how to do that if you are interested:
    https://kx.cloudingenium.com/technologies/wordpress/quick-fix-wordpress-seo-yoast-sitemap_index-xml-giving-blank-page/

    JCBauza, you’re amazing, thanks for sharing that, it worked like a charm, Joost should read this fix, it’s still producible on the latest version of WordPress SEO.

    I needed to do JCBAuza’s suggestion along with replacing the init function inside class-sitemaps.php in WordPress SEO plugin with the following code as per another thread:

    function init() {
    		global $wp_rewrite;
    		$GLOBALS['wp']->add_query_var( 'sitemap' );
    		$GLOBALS['wp']->add_query_var( 'sitemap_n' );
    		$GLOBALS['wp']->add_query_var( 'xsl' );
    
    		$this->max_entries = ( isset( $this->options['entries-per-page'] ) && $this->options['entries-per-page'] != '' ) ? intval( $this->options['entries-per-page'] ) : 1000;
    
    		add_rewrite_rule( 'sitemap_index\.xml$', 'index.php?sitemap=1', 'top' );
    		add_rewrite_rule( '([^/]+?)-sitemap([0-9]+)?\.xml$', 'index.php?sitemap=$matches[1]&sitemap_n=$matches[2]', 'top' );
    		add_rewrite_rule( '([a-z]+)?-?sitemap\.xsl$', 'index.php?xsl=$matches[1]', 'top' );
    
    		$wp_rewrite->flush_rules();
    	}

    Thanks a lot JCBauza, it worked perfectly also in my case! ??

    Having the same problem, after updating Yoast and wordpress, blank page.

    If you require assistance then, as per the Forum Welcome, please post your own topic.

    This 6 month old topic references an old version of WordPress.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘sitemap_index.xml giving blank page’ is closed to new replies.