• Resolved Rodrigo Domínguez

    (@roddominguez)


    Hi, Bootstrap for CF7 suddenly stopped working, now all my forms are unstyled even though I use a Bootrsap 3 based theme. CF7 recently released an update, not sure if that’s messing with the plugin.

    Any help appreciated

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi Rodrigo,
    This is actually due to CF7 last update (7.4.6) where few functions has become deprecated. In order to fix this until a new compatibility patch for this plugin, you have to manually search/replace in plugin files these relevant functions:

    • WPCF7_Shortcode” to “WPCF7_FormTag” (13 occurrences)
    • wpcf7_add_shortcode” to “wpcf7_add_form_tag” (25 occurences)
    • wpcf7_scan_shortcode” to “wpcf7_scan_form_tags” (1 occurence)

    Hope it helps!
    Cheers

    • This reply was modified 8 years, 3 months ago by Rumores.
    • This reply was modified 8 years, 3 months ago by Rumores.

    For those of you with command line access on Linux, use:

    find . -type f -exec sed -i 's/WPCF7_Shortcode/WPCF7_FormTag/g' {} +
    
    find . -type f -exec sed -i 's/wpcf7_add_shortcode/wpcf7_add_form_tag/g' {} +
    
    find . -type f -exec sed -i 's/wpcf7_scan_shortcode/wpcf7_add_scan_tags/g' {} +

    within the root of the plugin’s folder.

    Thanks for the fix @rumores

    I’ve found the previous solution to work for returning Bootstrap functionality. The form does send the email too. However, the response for the user now fails.

    I get a 500 response at https://www.mysite.com/mypage/?_wpcf7_is_ajax_call=1&_wpcf7=15168&_wpcf7_request_ver=1480967644772

    I’ll see if I can track it down, but any help is greatly appreciated.

    I tried this fix, and although the form looks better again; the form will not submit.

    Slight correction, it appears to work, but the verification the form was submitted never displays.

    Hi,
    In my case submission messages and verification checks seems to work fine.

    I’ve just noticed an issue with the loading GIF that no longer displays (“ajax-loader” class is now used for a span with background image instead of directly an image).

    The dirty-fix I found was to restore original CF7 styles by deactivating “cf7bs_enqueue_styles” action in “modifications.php” (line 97)…

    function cf7bs_enqueue_styles() {
    	wp_dequeue_style( 'contact-form-7' );
    }
    // add_action( 'wpcf7_enqueue_styles', 'cf7bs_enqueue_styles' );

    …then searching/replacing these lines in plugin files:

    $( this ).find( 'img.ajax-loader' ).css({ visibility: 'hidden' });
    by
    $( this ).find( '.ajax-loader' ).removeClass( 'is-active' );
    (3 occurences)

    i(this).find("img.ajax-loader").css({visibility:"hidden"})
    by
    i(this).find(".ajax-loader").removeClass("is-active")
    (1 occurence)

    a(this).find("img.ajax-loader").css({visibility:"hidden"})
    by
    a(this).find(".ajax-loader").removeClass("is-active")
    (1 occurence)

    I hope it can help.

    • This reply was modified 8 years, 2 months ago by Rumores.
    Thread Starter Rodrigo Domínguez

    (@roddominguez)

    Thank your Rumores, your temporary fix did it. Forms are submitted correctly with verification shown up. Let’s hope we get an update soon.

    Thanks,

    I fixed it by replacing the deprecated functions. Should work until the Plugin is updated.

    Thanks again

    Works,
    @rumores
    thanks a lot!

    Hello
    Do you have files to download? I try and it does not work for me

    Hello,

    I had the same but I fix it in another way.
    Just download the previous version of the cf7 plugins and replace it manually with ftp.
    Everything works and now just wait until the update is there.

    Guido

    Hi there,

    I uploaded the modified files to share with who needs until an update came out:
    https://drive.google.com/open?id=0Bz6t6tZXISXTdnVJQm1GbXYwZk0

    I hope the author maintains this plugin development and that a patch will be released soon.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Broken after CF7 update’ is closed to new replies.