• Resolved antonv

    (@antonv)


    This seems to be a ContactForm7 issue or a custom code issue.

    If W3 Total Cache is used then one cannot Save to Draft, Save or Send using a non-mapped contact form. The system just hangs and no errors are reported in the server log files.

    However, using WP Fastest Cache everything is fine and the website is also super fast.

    I use following filters that would also be used by non mapped forms

    add_filter('cf7sg_prefill_form_fields', 'prefill_cf7sg_new_article_form',10,2);
    add_filter( 'cf7sg_validate_submission','validate_field_submission',10,3);
    add_filter( 'wpcf7_before_send_mail', 'wpcf7_before_send_mail_function', 10, 3 );
    add_filter('cf7sg_prefill_form_fields', 'prefill_cf7sg_correspondence',10,2); 

    This is for information

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    thanks for reporting this.

    If W3 Total Cache is used then one cannot Save to Draft, Save or Send using a non-mapped contact form. The system just hangs and no errors are reported in the server log files.

    is this the case also with Post My CF7 Form disabled?

    Post My CF7 Form will add no-cache meta headers to the page where a mapped form is embedded. (see faq #19), this ensures that the page is not cached by a caching plugin/server and pre-filled values (drafts) are not cached.

    Thread Starter antonv

    (@antonv)

    I will test this on a test site and not on my production site which now uses WP Fastest Cache

    Will report back in a couple of days

    Thread Starter antonv

    (@antonv)

    I could not reproduce the problem with W3 Total Cache on a separate site using the same host, same WP 6.01, PHP 8.1 etc but using minimal forms without hooking to custom code.

    I used the default settings that W3TC starts up with after installment.

    I then reloaded the W3 Total Cache on the production site, and got these console messages:

    XHR GET https://example.org/wp-json/contact-form-7/v1/contact-forms/117/refill
    [HTTP/1.1 401 Unauthorized 767ms]
    
    Response { type: "basic", url: "https://example.org/wp-json/contact-form-7/v1/contact-forms/117/refill", redirected: false, status: 401, ok: false, statusText: "Unauthorized", headers: Headers(15), body: ReadableStream, bodyUsed: false }    4ea64.js:1:5256
    T
    he resource at “https://example.org/wp-content/plugins/w3-total-cache/pub/js/lazyload.min.js” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly.

    I then compared the W3TC settings from the test site with those of the production site, they all matched.

    Now here is the perplexing part, at the bottom of each setup page, I pressed [Save All Settings] even though I changed nothing. Having done that on the Minify Tab of W3TC the problem resolved and it is now all working.

    No wonder my hair is greying at a rapid pace ??

    Thread Starter antonv

    (@antonv)

    housekeeping: marking as resolved

    Plugin Author Aurovrata Venet

    (@aurovrata)

    Dear @antonv thank you for the diligent reporting here, this may well come in handy for someone else in the future.

    No wonder my hair is greying at a rapid pace

    all salt no pepper on my head ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problem with W3 Total Cache’ is closed to new replies.