WordPress.org

Support

Support » Plugins and Hacks » Google XML Sitemaps » [Plugin: Google XML Sitemaps] (Mild) Incompatibility with domain mapping plugin

[Plugin: Google XML Sitemaps] (Mild) Incompatibility with domain mapping plugin

  • This plugin gives itself high priority in the template_redirect chain, and supersedes the domain mapping redirect. One can fix this by deregistering the hook and reregistering it with a lower priority in one’s code (either a theme or in a proprietary network-activated plugin).

    add_action('init', 'alter_sitemap_chain', 1001);
    
    function alter_sitemap_chain() {
    	remove_action( 'template_redirect', array('GoogleSitemapGeneratorLoader', 'DoTemplateRedirect'), 1, 0 );
    	add_action('template_redirect', array('GoogleSitemapGeneratorLoader', 'DoTemplateRedirect'), 11, 0 );
    }

    Note that if you have another plugin or theme which uses template_redirect that wouldn’t otherwise be run as a result of this plugin running early in the chain and exiting, it’s possible that this could then cause undesirable behavior for you. Naturally, this should be tested thoroughly on any system on which it is deployed.

    I’m sure there are other issues with the domain mapping plugin and this one (i.e. if using the “Redirect admin requests” option in DM plugin, Google et al are probably notified of the subdomain URL and not the domain-mapped URL). As I discover and fix them, I’ll post my solutions in this thread.

    http://wordpress.org/extend/plugins/google-sitemap-generator/

  • The topic ‘[Plugin: Google XML Sitemaps] (Mild) Incompatibility with domain mapping plugin’ is closed to new replies.
Skip to toolbar