wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

Issues with Swup

Open gonzalo-terrahq opened this issue 1 year ago • 1 comments

The Bug Hello, I'm using Swup for page transitions and it's causing an issue with CF7. If I navigate to a page without a form and then to one with a form, my JS fails because it doesn't detect the form. Is there a way to make a callback or execute WpRocket on ContentReplaced of Swup to launch it again every time I change pages?

Steps Steps to reproduce the behavior:

  1. Swup for transitions + CF7 plugin for forms + wprocket
  2. Load a page without form
  3. Change to a page with form
  4. See console error

Expected behavior I want to execute WpRocket on Swup ContentReplaced, so the plugin loads really again

gonzalo-terrahq avatar Feb 15 '24 13:02 gonzalo-terrahq

you can completely disable our compatibility with CF7 using the following code:

add_filter( 'rocket_thirdparty_load', function( $status, $thirdparty ) {
    if ( 'contact-form-7' !== $thirdparty ) {
        return $status;
    }
    return false;
}, 10, 2 );

wordpressfan avatar Feb 15 '24 14:02 wordpressfan

We did not have any feedback from customers about this issue.

piotrbak avatar Jun 28 '24 15:06 piotrbak