• Our page and post sitemaps created by Yoast are broken. After going through each plugin one by one, we whittled it down to this one. Only when this plugin is deactivated will the post and page sitemaps work. I’ve left the plugin activated and you can see the error in the link. When I deactivate your plugin, the sitemap appears without any errors.

    Any thoughts?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter rscarter1

    (@rscarter1)

    Is there a way I can find the CSS the plugin created and copy that into the theme so I can deactivate the plugin for now? Not sure if this is still being supported….

    Thread Starter rscarter1

    (@rscarter1)

    It’s Autoptimize. If I deactivate this and keep your plugin on, the sitemap works again. I need to tell Autoptimize to ignore your script or css, but not sure which file to use.

    • This reply was modified 5 years, 9 months ago by rscarter1.

    hey @rscarter1 & @wpmonks;
    This is a very weird one, as AO isn’t active on sitemaps at all? Let me know if I can help!

    frank (ao dev)

    Thread Starter rscarter1

    (@rscarter1)

    Hi @optimizingmatters ,
    Thanks for the response! It is the Yoast sitemaps that are affected. When AO is turned on with this Styles plugin, css is added to the Yoast page and post sitemaps, weirdly. When I deactivate AO and keep the Styles plugin activated, the sitemaps work. Conversely, if I deactivate Styles and keep AO on, the sitemaps also work. But together, nope!

    • This reply was modified 5 years, 9 months ago by rscarter1.

    well, AO should automatically bail when being passed on a xml-file, but if it does not (I’ll have to investigate why) you can force AO to do so with a code snippet like this one;

    add_filter('autoptimize_filter_noptimize','my_ao_noptimize',10,0);
    function my_ao_noptimize() {
    	if (strpos($_SERVER['REQUEST_URI'],'sitemap.xml')!==false) {
    		return true;
    	} else {
    		return false;
    	}
    }

    hope this helps,
    frank

    Thread Starter rscarter1

    (@rscarter1)

    @optimizingmatters , thanks – it’s not just AO. I tried Litespeed optimization and the same thing happens. I don’t know why. The CSS is brought into into the page and post sitemaps when this plugin is used. But I do appreciate the response.

    • This reply was modified 5 years, 9 months ago by rscarter1.

    @wpmonks We are getting a lot of these same issues that are causing errors in Google Console. It is keeping the xml sitemaps from being crawled. Can you have the plugin generate its own style sheet and add the styles from there? Dumping styles at the top of the page isn’t the best practice for SEO friendly sites and it’s causing a lot of issues.

    Plugin Author wpmonks

    (@wpmonks)

    @astoundzme Can you send me link for the sitemap page using the contact form on below page.

    https://wpmonks.com/contact-us/

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Plugin Breaks Yoast Page and post Sitemaps’ is closed to new replies.