Forum Replies Created

Viewing 15 replies - 1 through 15 (of 106 total)
  • Thread Starter Aphotrax

    (@vlijmen)

    After some investigation by @qtwrk we found the solution. For those interested to disable all purges called by the disqus comment sync you can use the following:

    if( !function_exists('is_plugin_active') ) {
    	include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    }
    
    add_action( 'rest_api_init', 'disable_disqus_purge' );
    function disable_disqus_purge(){
    	if(is_plugin_active('litespeed-cache/litespeed-cache.php') AND is_plugin_active('disqus-comment-system/disqus.php') AND strpos($_SERVER["REQUEST_URI"],'wp-json') AND strpos($_SERVER["REQUEST_URI"],'disqus')) {
    		remove_action( 'edit_post', 'LiteSpeed_Cache_Purge::purge_post' ) ;
    		remove_action( 'wp_update_comment_count', 'LiteSpeed_Cache_Purge::purge_feeds' ) ;
    	}
    }

    This would prevent the homepage, post and feeds to be purged when disqus comments are syncing. In case you still want to purge the feeds you can remove:
    remove_action( 'wp_update_comment_count', 'LiteSpeed_Cache_Purge::purge_feeds' ) ;
    from the code above.

    By using a cronjob you could also purge the posts or frontpage for example with specific intervals (that’s my solution). But that’s to much detail this question is answered. Big thanks to @qtwrk !

    Thread Starter Aphotrax

    (@vlijmen)

    Ofcourse, just created an account. But not sure what to do next…

    Thread Starter Aphotrax

    (@vlijmen)

    I’ve just done a reset (only re-enabled logging), but it didn’t change anything. First comment sync and directly a purge.

    Did you enable comment syncing in your test installation? It’s not the comment itself causing the purge but the sync that’s done through the WP REST API.

    
    07/23/19 18:07:24.729 [208.101.7.43:54152 1 nZj] 💓 ------POST HTTP/1.1 (HTTPS)  /wp-json/disqus/v1/sync/webhook
    07/23/19 18:07:24.729 [208.101.7.43:54152 1 nZj] Query String: 
    07/23/19 18:07:24.729 [208.101.7.43:54152 1 nZj] LSCACHE_VARY_COOKIE: wp-postpass_ffa8c56742b72057e9da18b5138edec1
    07/23/19 18:07:24.729 [208.101.7.43:54152 1 nZj] X-LiteSpeed-Purge: public,stale,aa2_Po.25446,aa2_URL.08fbfda29cdd4ef2683e3ae25a0e89ef,aa2_W.recent-posts-1,aa2_Po.25430,aa2_T.4434,aa2_T.4332,aa2_T.4059,aa2_T.4232,aa2_T.3672,aa2_T.4035,aa2_T.3778,aa2_T.10247,aa2_T.7173,aa2_T.18113,aa2_T.4529,aa2_T.18112,aa2_T.5648,aa2_T.7761,aa2_T.8133,aa2_T.18109,aa2_T.4637,aa2_T.4552,aa2_T.18107,aa2_T.18111,aa2_T.4579,aa2_T.4648,aa2_T.7711,aa2_T.18110,aa2_T.18108,aa2_T.4633,aa2_T.4650,aa2_A.34,aa2_PT.post,aa2_F,aa2_H,aa2_PGS,aa2_PGSRP,aa2_D.201907,aa2_REST => LSC->send_headers()@680 => WP_Hook->apply_filters()@286 => WP_Hook->do_action()@310 => 
    /home/public_html/wp-includes/load.php@465
    07/23/19 18:07:26.359 [208.101.7.44:27692 1 WBy] 💓 ------POST HTTP/1.1 (HTTPS)  /wp-json/disqus/v1/sync/webhook
    07/23/19 18:07:26.359 [208.101.7.44:27692 1 WBy] Query String: 
    07/23/19 18:07:26.359 [208.101.7.44:27692 1 WBy] LSCACHE_VARY_COOKIE: wp-postpass_ffa8c56742b72057e9da18b5138edec1
    07/23/19 18:07:26.359 [208.101.7.44:27692 1 WBy] X-LiteSpeed-Purge: public,stale,aa2_Po.25446,aa2_URL.08fbfda29cdd4ef2683e3ae25a0e89ef,aa2_W.recent-posts-1,aa2_Po.25430,aa2_T.4434,aa2_T.4332,aa2_T.4059,aa2_T.4232,aa2_T.3672,aa2_T.4035,aa2_T.3778,aa2_T.10247,aa2_T.7173,aa2_T.18113,aa2_T.4529,aa2_T.18112,aa2_T.5648,aa2_T.7761,aa2_T.8133,aa2_T.18109,aa2_T.4637,aa2_T.4552,aa2_T.18107,aa2_T.18111,aa2_T.4579,aa2_T.4648,aa2_T.7711,aa2_T.18110,aa2_T.18108,aa2_T.4633,aa2_T.4650,aa2_A.34,aa2_PT.post,aa2_F,aa2_H,aa2_PGS,aa2_PGSRP,aa2_D.201907,aa2_REST => LSC->send_headers()@680 => WP_Hook->apply_filters()@286 => WP_Hook->do_action()@310 => 
    /home/public_html/wp-includes/load.php@465
    
    07/23/19 18:07:40.663 [208.101.7.44:56996 1 BqJ] 💓 ------POST HTTP/1.1 (HTTPS)  /wp-json/disqus/v1/sync/webhook
    07/23/19 18:07:40.663 [208.101.7.44:56996 1 BqJ] Query String: 
    07/23/19 18:07:40.663 [208.101.7.44:56996 1 BqJ] LSCACHE_VARY_COOKIE: wp-postpass_ffa8c56742b72057e9da18b5138edec1
    07/23/19 18:07:40.663 [208.101.7.44:56996 1 BqJ] X-LiteSpeed-Purge: public,stale,aa2_Po.25446,aa2_URL.08fbfda29cdd4ef2683e3ae25a0e89ef,aa2_W.recent-posts-1,aa2_Po.25430,aa2_T.4434,aa2_T.4332,aa2_T.4059,aa2_T.4232,aa2_T.3672,aa2_T.4035,aa2_T.3778,aa2_T.10247,aa2_T.7173,aa2_T.18113,aa2_T.4529,aa2_T.18112,aa2_T.5648,aa2_T.7761,aa2_T.8133,aa2_T.18109,aa2_T.4637,aa2_T.4552,aa2_T.18107,aa2_T.18111,aa2_T.4579,aa2_T.4648,aa2_T.7711,aa2_T.18110,aa2_T.18108,aa2_T.4633,aa2_T.4650,aa2_A.34,aa2_PT.post,aa2_F,aa2_H,aa2_PGS,aa2_PGSRP,aa2_D.201907,aa2_REST => LSC->send_headers()@680 => WP_Hook->apply_filters()@286 => WP_Hook->do_action()@310 => 
    /home/public_html/wp-includes/load.php@465
    
    Thread Starter Aphotrax

    (@vlijmen)

    Re-hi,

    What I forgot to mention, before switching to LSCache I used WP-Rocket and at that time I had the following to disable cache purge on comment sync:

    remove_action('clean_post_cache', 'rocket_clean_post' );
    remove_action('wp_update_comment_count', 'rocket_clean_post' );

    So looking for kind of the same solution, but there I’m stuck. 🙂

    Thread Starter Aphotrax

    (@vlijmen)

    Thank you for getting back to me that quickly. I will have to see with the client if I can give you access, but I’m afraid not.

    I’ve just submitted a report (QBVOEVGS), maybe that helps. I’ve also uploaded the debug.purge.log that can be viewed here: https://pastebin.com/RBvqdP38 (changed the userid and domainname) I’ve tried to understand it, but didn’t get everything, so maybe that could tell you more about why the posts get purged more often then needed. 🙂

    The posts really only need to be purged on publish or update for them. I can purge the homepage with a cron (like we do for some other custom pages already).

    Big thanks!

    PS: If you mean by do a comment, posting a comment (had to read it twice), yes of course. But best not to do it on the most recent artikels. 🙂

    • This reply was modified 4 years, 9 months ago by Aphotrax.
    Plugin Author Aphotrax

    (@vlijmen)

    Hi,

    I don’t remember changes it, but the monitors should also be seperated by a -. Could you try if that solves the issue?

    Regards,
    Niels

    Thread Starter Aphotrax

    (@vlijmen)

    Great, looking forward to it!

    Hi Ryan,

    Thank you for the follow up, the sync is back up and running. Just a question, how can we recover the missed comments between 08/02 and 13/02? I don’t see a resync function like there was before.

    With kind regards,
    Niels

    (I’m the developer for Noodweer.be)

    Plugin Author Aphotrax

    (@vlijmen)

    Hi,

    Looking at the error it seems like your php compilation doesn’t have the bcmath (for calculations) module enabled.

    To solve this you should enable the module and recompile php or contact your hosting company.

    For more information: http://php.net/manual/en/book.bc.php

    Regards,
    Niels

    Plugin Author Aphotrax

    (@vlijmen)

    Hi,

    My apologies for the late reply to your issue. With the update to v2.2 from today this should be resolved.

    With kind regards,
    Niels

    Plugin Author Aphotrax

    (@vlijmen)

    Hi,

    My apologies for the really late reply to your issue. The problem you are having is not related to the API change on their side. The plugin is already using the v2 version of the API for more then a year now (It was already enabled before it was official live).

    It seems like there is an issue with the connection though. Do you get any errors when you turn on debug mode in WordPress? I’ve released a new version with some other fixes and updates today, maybe it’s already resolved, but please let me know if it’s working.

    With kind regards,
    Niels

    Plugin Author Aphotrax

    (@vlijmen)

    Dear Cameron,

    My apologies for the really late reply to your issue. I think the error you are seeing is not related to PHP7 but to curl requests that where made. Today I updated the plugin with quite some fixes and improvements including this one.

    If you are still interested please give it a nother try and let me know if it’s working now.

    With kind regards,
    Niels

    In that case I don’t see any issues here. Thanks for the feedback.

    Dear Mailpoet team,

    Thanks for the feedback regarding my question. A follow-up question to this, something I should have thought of directly, how is this request made?

    Is this an Ajax request or just plain php coding. If it’s the second one I don’t see any issues. As you probably understand we use custom caching so not every pageload will run the php code. Only if it’s using Ajax I’m afraid for the consequences. 🙂

    Have a good weekend,
    Niels

    Dear Mailpoet,

    In that case I’m wondering how this would work out for a website with more then a million hits a day. I disabled the WP cron because it causes too much overhead for us.

    With this new implementation I’m a bit afraid that every hit will trigger Mailpoet to check the queue. Is this indeed the case, and are there any plans to changes this in the future. We are currently using Mailchimp but I would like to switch to Mailpoet since I use it with great pleasure on other smaller sites already.

    Thanks in advance.

    Regards,
    Niels

Viewing 15 replies - 1 through 15 (of 106 total)