• I posted previously that there was an issue with ZenCache caching the Really Simple CAPTCHA images if the page was refreshed.

    ZenCache have suggested a short-term workaround which does not work for me.
    Add _wpcf7_is_ajax_call to your list of ZenCache URI Exclusions.

    The longer term suggestion is below:
    The Contact Form 7 developer might want to consider using DONOTCACHEPAGE in their AJAX handler in order to prevent WordPress caching plugins from caching the response that is dynamic [the CAPTCHA image]. Referencing: https://github.com/wp-plugins/contact-form-7/blob/master/includes/controller.php

    https://www.ads-software.com/plugins/contact-form-7/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Do you have this line in your wp-config.php file?

    define('WP_CACHE', TRUE);

    Thread Starter Decimus

    (@decimus)

    I just checked 11 wp-config.

    Two which are dormant/test sites have the line you requested.

    <?php
    define('WP_CACHE', TRUE);

    The other 9 which are the up-to-date sites do not have the line you requested.

    Please advise if I need to add it in manually to all the wp-config files?

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Normally ZenCache should have added it. Ask ZenCache author for support.

    Thread Starter Decimus

    (@decimus)

    Adding in

    <?php
    define('WP_CACHE', TRUE);

    as the second line of the wp-config does not solve the caching of the CAPTCHA image on page refresh

    Thread Starter Decimus

    (@decimus)

    I might have a fix on this. I think this might be a FireFox issue.

    See below
    I have enabled ZenCache on BajanThings. (BTW define(‘WP_CACHE’, TRUE); is added in on line 2 of wp-config.php once you enable ZenCache… if you disable it removes line 2)

    Go to: https://www.bajanthings.com/contact-burts/

    * Open it in IE, I am using Version 11.0.9600.17842,
    press page reload and the CAPTCHA image refreshes as expected.

    * Open it in Chrome, I am using Version 43.0.2357.132 m,
    press page reload and the CAPTCHA image refreshes as expected.

    * Open it in Firefox, I am using Version 39.0,
    press page reload and the CAPTCHA image DOES NOT refreshes as expected. Are you seeing this too?

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    What other plugins do you use?

    Thread Starter Decimus

    (@decimus)

    Installed plugin on BajanThings are:
    Akismet
    Contact Form 7
    Easy Theme and Plugin Upgrades
    FooBox HTML & Media Lightbox
    Google Analyticator
    Google XML Sitemaps
    Jetpack by WordPress.com
    NextGEN Gallery by Photocrati
    NextGEN Plus by Photocrati
    Really Simple CAPTCHA
    SEO Ultimate
    Simple Breaks
    Subscribe2
    TablePress
    Weaver Show Posts
    Weaver Themes Shortcode Compatibility
    Weaver Xtreme Plus
    Weaver Xtreme Theme Support
    WP-DBManager
    WP-Optimize
    ZenCache

    Thread Starter Decimus

    (@decimus)

    Feedback from ZenCache after post about Firefox.

    @raamdev I see nothing ZenCache-specific here. This really seems to be two issues with CF7.

    Not setting DONOTCACHEPAGE on AJAX responses that deliver dynamic content.
    Not calling nocache_headers() on AJAX responses that deliver dynamic content.

    Those are both educated guesses. I have not spent enough time with that plugin to say absolutely for sure. Further investigation on their part would be suggested.

    Thread Starter Decimus

    (@decimus)

    For what its worth I am using a win8.1 64 bit

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    No, they are not the direct cause of this issue. Maybe ZenCache isn’t related, either.

    This is the HTML of the CAPTCHA image. I got this with the latest Firefox and Firebug.

    <img class="wpcf7-form-control wpcf7-captchac wpcf7-captcha-captcha-603" width="84" height="28" src="https://www.bajanthings.com/wp-content/uploads/wpcf7_captcha/1247228803.png" alt="captcha" srcset="https://i0.wp.com/www.bajanthings.com/wp-content/uploads/wpcf7_captcha/1310244177.png?zoom=2&resize=84%2C28" src-orig="https://i0.wp.com/www.bajanthings.com/wp-content/uploads/wpcf7_captcha/1310244177.png?resize=84%2C28" scale="2">

    The “srcset”, “src-orig”, and “scale” attributes are not by Contact Form 7, they are actually added by something unknown. Something is changing the output of Contact Form 7.

    The “src” attribute is updated correctly by Contact Form 7, but “srcset” and “src-orig” are not. This is the direct cause of your issue.

    You need to trace who is adding those problematic attributes. Try deactivating all other plugins and switching to the default theme. If this fixes the issue, then reactivate them one by one.

    Thread Starter Decimus

    (@decimus)

    Initially I thought it was Foobox….

    Those parameters that you are referring to are added by the WP Jetpack Photon caching tool where WP caches your images and serve them from their super-fast network.

    This is the CAPTCHA image with WP Jetpack Photon deactivated:

    <img class="wpcf7-form-control wpcf7-captchac wpcf7-captcha-captcha-603" width="84" height="28" src="https://www.bajanthings.com/wp-content/uploads/wpcf7_captcha/1662277107.png" alt="captcha" scale="0">

    The WP Photon issue now makes sense now. I run another site that also uses your contact tool.
    https://www.art-treasures-gallery.com/contact-art-treasures-gallery/

    I was struggling to work out why that contact form appeared to work and why all the others CAPTCHA images on my other sites were caching.

    For Art Treasures Gallery I turned off Photon as the WP authors have been outspoken about free speech in China and China has hit back by blocking anything associated with WP servers, so to have the images on the Art Treasures Gallery website visible in China I had to uncouple all the tools that are linked to WP servers. For more info you can read about it here: https://www.art-treasures-gallery.com/website/

    What’s the next step?

    Thread Starter Decimus

    (@decimus)

    @takayuki Miyoshi just checking in to see where we go from here given issue appears to be WP Jetpack Photon

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Jetpack’s support?

    Thread Starter Decimus

    (@decimus)

    @takayuki Miyoshi this has been an issue for a while now for me and other. Think its time to move on and swap out to Fast Secure Contact Form which I’ve been testing and works out of the box with Jetpack et al.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘CAPTCHA cache issue’ is closed to new replies.