• Resolved Amber Daulton

    (@amberdaultonauthor)


    Hello.

    I just installed WPSC yesterday on my WordPress site after trying several other cache plugins that were problematic and just didn’t cache like they were supposed to. (LiteSpeed, Quic.cloud, Cloudflare, etc — they all had issues.) WPSC does seem to cache my site, and page speed has improved some.

    The problem is that the Timestamp is off. I checked the debug log and realized it was my Mailster plugin was the problem. I then verified that by deactivating Mailster, and the Timestamp was good.

    The thing is, I can’t get rid of Mailster. I use that in conjunction with Amazon SES to send out my newsletter to my subscribers, so if I have to get rid of anything, it’s going to be the WPSC. I really don’t want to do that, so please, could someone help me with a workaround or a bit of code to make these plugins compatible?

    I use Chrome on a Windows 10 laptop and my hosting provider is Hostinger, if you need that info.

    Thanks so much.

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

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    What do you mean, the “timestamp is off”? Is it the timestamp that appears in the source code when a page is cached?

    If the page is being cached, then it doesn’t really matter what that timestamp says. Enable debugging in the plugin and check what it says when you load a page. It should say it’s serving the page from cache, the second time you load it.

    But, if pages aren’t being cached, then the debugging log might tell you what’s going on too.

    I’ve never used Mailster, so unfortunately I can’t tell why it’s causing problems. ??

    Thread Starter Amber Daulton

    (@amberdaultonauthor)

    On the Easy tab, in the Cache Tester section, I keep getting this error message:

    Fetching https://amberdaulton.com/ to prime cache: OK (0.html)

    Fetching first copy of https://amberdaulton.com/: OK (1.html)

    Fetching second copy of https://amberdaulton.com/: OK (2.html)

    • Page 1: 200 (OK)
    • Page 2: 200 (OK)

    The pages do not match! Timestamps differ or were not found!

    In the debugging log, the pages aren’t being cached. I’m finding lines like:

    “No Super Cache file found for current URL: ABSPATH/wp-content/cache/supercache/amberdaulton.com/index-https.html”

    “No closing html tag. Not caching.”

    https://amberdaulton.com/ – Page not cached by WP Super Cache. No closing HTML tag. Check your theme.”

    “DONOTCACHEPAGE defined. Caching disabled.”

    So on top of the Mailster plugin being an issue, it looks like my theme, Chic Lite, might be a problem too. I don’t know what to do to fix any of this. Advice or help would be most appreciated. Thanks!

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    That is weird. I can see the closing HTML tag in your page, but immediately above it is a mailster script tag. I bet it’s doing something odd to the footer of the page.

    It’s odd that this is happening. WP Super Cache basically creates a cached file while the PHP request is being destroyed, at the end of the request. It should be the very last thing that runs. There is a chance that mailster is doing the same thing to grab a copy of the page.

    I don’t have access to mailster, but can you search through the source code of that plugin for the string “ob_start”? Or contact their support and ask if they create an output buffer to capture the content of your site for the newsletter.

    Thread Starter Amber Daulton

    (@amberdaultonauthor)

    I searched through the mailster.php file and didn’t find the string “ob_start”. My access to Customer Support has ended with Mailster, so I can’t get any help from them. I ran a self-diagnosis test through Mailster (it comes with a self-test feature) and it didn’t pick up any problems or issues, but it may or may not be correct.

    I don’t know what else to do. I’d very much appreciate your help. Thanks!

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    Is there an option, “disable form caching”? This page says that will stop the page caching. That may be the issue here.

    However, I saw in other docs that Mailster uses nonce, which are a security feature, so you should probably set the garbage collection timeout to less than an hour in WP Super Cache->Advanced Settings. Maybe even to 10 minutes, to be safe.

    Thread Starter Amber Daulton

    (@amberdaultonauthor)

    I checked the advanced-cache.php, and I think the problem (or at least one of them) might be there:

    <?php
    // WP SUPER CACHE 1.2
    function wpcache_broken_message() {
    global $wp_cache_config_file;
    if ( isset( $wp_cache_config_file ) == false ) {
    return ”;
    }

    $doing_ajax     = defined( 'DOING_AJAX' ) && DOING_AJAX;
    $xmlrpc_request = defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST;
    $rest_request   = defined( 'REST_REQUEST' ) && REST_REQUEST;
    $robots_request = strpos( $_SERVER['REQUEST_URI'], 'robots.txt' ) != false;
    
    $skip_output = ( $doing_ajax || $xmlrpc_request || $rest_request || $robots_request );
    if ( false == strpos( $_SERVER['REQUEST_URI'], 'wp-admin' ) && ! $skip_output ) {
        echo '<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->';
    }

    }

    if ( false == defined( ‘WPCACHEHOME’ ) ) {
    define( ‘ADVANCEDCACHEPROBLEM’, 1 );
    } elseif ( ! include_once WPCACHEHOME . ‘wp-cache-phase1.php’ ) {
    if ( ! @is_file( WPCACHEHOME . ‘wp-cache-phase1.php’ ) ) {
    define( ‘ADVANCEDCACHEPROBLEM’, 1 );
    }
    }
    if ( defined( ‘ADVANCEDCACHEPROBLEM’ ) ) {
    register_shutdown_function( ‘wpcache_broken_message’ );
    }

    —————– So I checked for the “constant WPCACHEHOME” in the wp-config.php, and it wasn’t there anywhere. How do I set and direct this constant?

    Also, I changed the Garbage Collection Timeout to 600 seconds (10 minutes) as requested, and then deleted the cache.

    I checked mailster.php for the “disable form caching” option and the “DONOTCACHEPAGE” constant, and I didn’t see them. However, the “DONOTCACHEPAGE” constant is all over the WP Super Cache debugging log on various Mailster lines.

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    Would you try uninstalling this plugin completely, and then install it again? Maybe that will help.

    Thread Starter Amber Daulton

    (@amberdaultonauthor)

    I just found the “disable form caching” option in the Advanced settings in Mailster, and I unchecked the box. I’ve been having trouble with Invalid Nonce anyway, so unchecking the box was a good idea. I also deleted a widget (a Mailster signup form at the bottom of every page on the website) that may or may not have caused the missing /html script issue.

    Now, the page timestamps match when I test the WPSC cache. However, the debugging log still shows caching is disabled, buffer is blank, etc.

    Thread Starter Amber Daulton

    (@amberdaultonauthor)

    I deactivated and uninstalled the cache plugin, checked in File Manager, and it was completely removed as far as I could tell. I installed and activated again, and nothing has changed. It’s the same as it was before.

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    I just visited your site and reloaded the front page a few times and caching seems to be working, although it is complaining that dynamic caching is enabled and “late init” isn’t enabled.

    The timestamp didn’t change the last few times I reloaded the page. ??

    Thread Starter Amber Daulton

    (@amberdaultonauthor)

    That’s good!!

    Is there anyway to fix the “dynamic caching” and “late init” issues?

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    On the advanced settings page there’s a “dynamic caching” setting. You can disable that. However, I wonder if Mailster uses that?

    If everything is working ok with dynamic caching on, you can ignore the “late init” warning. I added it to make sure that a developer enabled it if they needed all of WordPress available, but obviously Mailster doesn’t need it, if it depends on “dynamic caching”.

    Thread Starter Amber Daulton

    (@amberdaultonauthor)

    The box for the “dynamic caching” setting is grayed out, so I can’t uncheck it. Don’t know why it’s like that.

    I suppose everything else is working fine, but after trying several cache plugins over the past week, I don’t really know what to look for or what to test anymore. My brain is fried. lol.

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    Do you have expert caching enabled? That’s probably why. It only works with simple caching. I’m very happy that it’s working now!

    Thread Starter Amber Daulton

    (@amberdaultonauthor)

    Yes, I had expert caching checked. I went back to simple caching, then unchecked the dynamic cache and checked the late init. I’ve since deleted the cache.

    Could you please double check my site and see if the cache is still working? I think it is, but I’d just like a verification. Thank you so much!

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Timestamp issue with Mailster plugin’ is closed to new replies.