WordPress.org

Support

Support » Plugins and Hacks » [Plugin: XML & Google News Sitemap Feeds] Fatal Error: multi site

[Plugin: XML & Google News Sitemap Feeds] Fatal Error: multi site

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author RavanH
    Participant

    @ravanh

    Hi Troy, I’ve seen a report about this error before but cannot reproduce it.

    The line (199) the error refers to should only be run after the plugin has been upgraded. Do you see the error one time after plugin upgrade and after that no more? Or after any other plugin upgrade? Or do you see the error all the time?

    Hope you can tell me more so I can get closer to the root of it 🙂

    Plugin Author RavanH
    Participant

    @ravanh

    UPDATE:

    Could you try this for me? Open the plugin file XMLSitemapFeed.class.php in the WordPress plugin editor and find these lines near the end

    ...
    		// FLUSH RULES after (site wide) plugin upgrade
    		if (get_option('xml-sitemap-feed-version') != XMLSF_VERSION) {
    			update_option('xml-sitemap-feed-version', XMLSF_VERSION);
    			global $wp_rewrite;
    			$wp_rewrite->flush_rules();
    			// TODO fix PHP Fatal error:Call to a member function flush_rules() on a non-object in /var/www/wordpress/wp-content/plugins/xml-sitemap-feed/XMLSitemapFeed.class.php after (any?) plugin upgrade
    		}
    ...

    Now replace the two lines

    global $wp_rewrite;
    $wp_rewrite->flush_rules();

    with this one line

    add_action('init', 'flush_rewrite_rules');

    And to test if it does not generate an error on upgrade, open the file xml-sitemap.php and change the value for define('XMLSF_VERSION', '3.9.2'); to define('XMLSF_VERSION', '3.9.2.1'); for example. Then refresh your sites front page and check the logs again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: XML & Google News Sitemap Feeds] Fatal Error: multi site’ is closed to new replies.