Quantcast
Viewing all articles
Browse latest Browse all 19306

jumbo on "[Plugin: W3 Total Cache] "Post comments pages" setting broken due to missing post/page slug"

The following W3TC file handles the deletion of paginated blog post comments pages when the "Post comments pages" is set to true. It appears to be handled in the following file.
w3-total-cache\lib\W3\SharedPageUrls.php

The W3TC class function/method "get_post_comments_urls()" calls the native WordPress function "get_comments_pagenum_link()" which will just return a string that must be "appended" to any blog post page to navigate to its comments page, such as:

/comment-page-1/#comments
/comment-page-2/#comments
/comment-page-3/#comments

The problem is, W3TC is appending this string to the full comment URL's to be purged, but it's forgetting to include the actual post/page slug.

So, instead of marking the following cached files/pages to be purged:

http://example.com/blog/post-slug/comment-page-1/
http://example.com/blog/post-slug/comment-page-2/
http://example.com/blog/post-slug/comment-page-3/

W3TC is trying to find and delete these non-existent pages:

http://example.com/blog/comment-page-1/
http://example.com/blog/comment-page-2/
http://example.com/blog/comment-page-3/

Therefore, cached comment pages are never purged. Somewhere in the code, the post slug is simply being omitted, which makes this particular setting non-functional/broken.

Thanks.

https://wordpress.org/plugins/w3-total-cache/


Viewing all articles
Browse latest Browse all 19306

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>