• Resolved fkoomek

    (@fkoomek)


    Hello.

    I use Ajax powered comment system WPdiscuzz and when adding comment, the page is then excluded from cachiing. I dont see a reason for that. How to make the page cachable again?

    Radan

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support vupdraft

    (@vupdraft)

    The new comments will not show if you do not exclude the page from caching.

    To remove this goto Cache advanced settings and remove the page from the box under “URLs to exclude from caching

    Thread Starter fkoomek

    (@fkoomek)

    The new comments will show because they will load via Ajax. After I made a test comment with wpDiscuz, suddenly no page was cached anymore, it started acting really weirdly. And even when I removed all comments I couldn’t make the plugin start caching again. I had to reinstall it.
    You should check your plugin with wpDiscuz.

    I then commented on line 75 in file-based-page-cache.php

    	/*radan*//* if (!empty($_COOKIE['wpo_commented_post'])) {
    		$no_cache_because[] = 'The user has commented on a post (comment cookie set)';
    	}*/

    and line 67 in file-based-page-cache-functions.php to prevent other issues

    	/*radan*/	//$no_cache_because[] = __('Comments are opened and the visitor saved his information.', 'wp-optimize');

    Radan

    Thread Starter fkoomek

    (@fkoomek)

    “and remove the page from the box under “URLs to exclude from caching


    This box is empty.

    Plugin Support vupdraft

    (@vupdraft)

    1. Go to Cache >> advanced setting s > Always Purge URL(s) and add the URL sub-domain defined for the individual posts in your website. It is imperative that you use the proper wildcard (*) and slashes (/) for your affected posts (pages). For example, if your individual blog URLs (permalinks) have the format?https://www.mywebsite.com/blog/mywebsiteblogpost/, then use the following exclusion URL format:?https://www.mywebsite/blog/*/
    2. Purge Cache:?Purge all cache in the following sequence (wait one minute after clearing cache for each item): Theme, WP Rocket, SG Optimizer, Cloudflare, Browser
    3. Perform Verification Test:?Go back to your affected Blog or News post, enter a test comment, and verify the above works.

    If you still do not see comments displayed on your affected pages after following the above procedure, please check your wpDiscuz General Settings and make sure “Use WordPress native AJAX functions” is ON

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘comment cookie set prevent from caching’ is closed to new replies.