• Resolved huntero4

    (@huntero4)


    Hello!

    I have two WordPress sites using the exact same hosting configuration. On one site the yoast sitemaps work as expected, on the the other the non-pretty permalink index.php?sitemap=1 returns a 404.
    The main-sitemap.xsl url returns a critical error: “PHP Fatal error: Uncaught Error: Call to a member function get_contents() on null in /srv/example.com/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps.php:440”.

    Any ideas?

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Michael Tiña

    (@mikes41720)

    Hi,

    Could you confirm that you are using the latest version of WordPress 5.4.2 and Yoast SEO for WordPress 14.6.1? Did this issue where you are getting that error for the main-sitemap.xsl only occur with the latest version?

    Could you please also let us know if your settings for the WordPress Address URL and Site Address URL are the same for the website that is getting that error?

    Thread Starter huntero4

    (@huntero4)

    Thanks for the response @mikes41720,

    Yes, both sites are on WP 5.4.2 and Yoast SEO for WordPress 14.6.1
    The site that is getting the main-sitemap.xsl error is a new site we are setting up so as far as I know its been broken since we installed the Yoast plugin.

    Confirmed that the WordPress Address URL and the Site Address URL are the same.

    Thanks!

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi,

    Thank you for your response. Also, just to clarify, for your website that is encountering this error, is it using any special set-up that changes the plugin path? Or is your WordPress configuration on a multi-site or multi-domain installation?

    Thread Starter huntero4

    (@huntero4)

    Hi @mikes41720

    We aren’t using any special paths, and I verified that WPSEO_PATH . 'css/main-sitemap.xsl' is pointing to the correct location.

    We aren’t using a multi-site/multi-domain installation, just two separate wordpress sites on the same php/nginx server.

    Thanks!

    PS. I also disabled all other plugins and set it to use the default theme and was still able to reproduce the issue

    • This reply was modified 5 years, 10 months ago by huntero4.

    @huntero4 Can you please confirm wether the issue still occurs if you are using the most recent Yoast v14.7? You can learn more about updating here: https://kb.yoast.com/kb/how-can-i-update-my-free-plugin/

    Thread Starter huntero4

    (@huntero4)

    Shoot! Looks like we didn’t go through the Yoast Configuration Wizard. Once I did that, it started working.

    Thanks for all your help!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘index.php?sitemap=1 returns 404’ is closed to new replies.