keycdn / cache-enabler

A lightweight caching plugin for WordPress that makes your website faster by generating static HTML files.
https://wordpress.org/plugins/cache-enabler/
123 stars 46 forks source link

breaking WP 5.5 sitemap #101

Closed atomGit closed 4 years ago

atomGit commented 4 years ago

Cache Enabler v1.4.4 seems to be breaking the default WP v5.5 sitemap (/wp-sitemap.xml) - it looks like /wp-sitemap-index.xsl is not loading

when CE is enabled, it takes 1 or 2 refreshes of wp-sitemap and i'm seeing this where all formatting is gone...

https://12bytes.org/wp-sitemap-posts-post-1.xmlhttps://12bytes.org/wp-sitemap-posts-page-1.xmlhttps://12bytes.org/wp-sitemap-taxonomies-category-1.xmlhttps://12bytes.org/wp-sitemap-users-1.xml

this is reproducible about 90% of the time, but not 100%

coreykn commented 4 years ago

You're right, it looks likes previously checking the trailing slash in Cache_Enabler::_bypass_cache() was unintentionally bypassing the cache for the sitemap. I'll investigate this issue further to see what the best solution would be. In the meantime, you can add /\.xsl|\.xml/ to the Cache Exclusions setting as the excluded page path regex.

atomGit commented 4 years ago

thanks Cory, but entering /\.xsl|\.xml/ in exclusions didn't work, but that's ok as long as this bug is addressed shortly - no problem

atomGit commented 4 years ago

just want to verify that this issue was not resolved in the 1.4.5 release, correct? i looked at the commit and i can't tell

also, if this helps, i found that after enabling CE, the sitemap always loads correctly the first time - only after a refresh/reload does it go wonky

coreykn commented 4 years ago

Just so you're aware, if an issue is resolved the status will be updated accordingly. This issue has not been resolved yet. The temporary solution is adding /\.xsl|\.xml/ as an excluded page path (you'll need to clear your cache afterwards). I'll have a solution for this within the next day or two.