Support » Plugin: Contact Form 7 » Latest v5.4 and deferred JS issues, possible release of update?

  • drazon

    (@drazon)


    Latest version (v5.4) seems to break frontend js when deferred and maybe have other issues as well. I see multiple js files loaded from wp-includes/js/dist/. Not even sure why a simple contact form plugin needs all this javascript by default.

    At autoptimize support forums Frank tries to find a solution by excluding the wp-includes/js/dist/ from js optimization.

    @takayukister Are you considering to release un update? I really liked the non jQuery attempt but loading JavaScript which can’t be deferred doesn’t seem performance wise. Moreover if loading more js just to not depend on jquery again makes me thinking.

    Maybe a setting at cf7 to let the user pick the frontend js behavior or give us some more time to test and proceed with a viable solution?

    Can you explain the use of each script loaded from wp-includes/js/dist/ by cf7?

    thank you in advance

Viewing 10 replies - 1 through 10 (of 10 total)
  • 123nadav

    (@123nadav)

    yes, you right I am with the same issue.
    the activate polyfill and another js defer cause performance issue and js error
    in js/dist.

    Thread Starter drazon

    (@drazon)

    And one more question I have is all this javascript needed especially the wp-polyfill if Gutnenberg is disabled?

    • This reply was modified 3 years ago by drazon.
    phaser32

    (@phaser32)

    Same problem here. Please can You solve this issue?

    domdomdomdom

    (@domdomdomdom)

    use the Plugin WP Rollback. After activation you have the “Rollback” option in each plugin.

    I came back to Version 5.3.2
    with your plugging WP Rollback, and Contacform it works again !

    Jan Weiss

    (@rumpel2116)

    have a look at this: WP Rocket is thinking about solutions here, seems to be their issue in some cases: https://github.com/wp-media/wp-rocket/issues/3625
    They defer WP-Core files that shouldn’t be deferred and CF7 uses now

    • This reply was modified 3 years ago by Jan Weiss.
    phaser32

    (@phaser32)

    @rumpel2116 Hi, it may be be possible that Wp Rocket could be involved BUT in my specific cases (more then 30 websites) Wp Rocket is NOT present but we have the same identical issue.
    Regards
    Ale

    Jan Weiss

    (@rumpel2116)

    @phaser32 Do you know if it is about defering the wp-includes/js/dist/ scripts? Do you defer them? The latest reply from GeekPress at WP Rocket github mentions another plugin that defers those file and already applied a fix, SG Optimizer: https://github.com/wp-media/wp-rocket/issues/3625#issuecomment-787862382

    Edit: Thanks for the hint, updated my reply above!

    • This reply was modified 3 years ago by Jan Weiss.
    phaser32

    (@phaser32)

    @rumpel2116 Unfortunately, all the sites for which we have reported the problem are heterogeneous. In some the js deferring is performed in others not, BUT (and I repeat) the problem is the same.

    Thread Starter drazon

    (@drazon)

    I rolled back 14 websites and excluded CF7 from auto updating.

    Here is what Frank @optimizingmatters from autoptimize suggests https://blog.futtta.be/2021/02/25/contact-form-7-update-breaks-autoptimize-js-optimization-workaround/ and by the way asks the same question I asked in the first post

    The full list of scripts to be excluded seem to be

    '/wp-includes/js/dist/vendor/lodash(.min)?.js',
    '/wp-includes/js/dist/api-fetch(.min)?.js',
    '/wp-includes/js/dist/i18n(.min)?.js',
    '/wp-includes/js/dist/vendor/wp-polyfill(.min)?.js',
    '/wp-includes/js/dist/url(.min)?.js',

    according to engahmeds3ed at https://github.com/wp-media/wp-rocket/issues/3625#issuecomment-787910907

    In any case this as a best case scenario will have a performance impact on websites with cf7. Worst case scenario is forms not working and with auto updates enabled web admins will have nightmares with clients the following days.

    @takayukister I really appreciate your work in cf7 and I noticed in one of your presentations a slide with “Never stop improving your plugin“. Do you mind explaining how loading all this js at the frontend which can’t be deferred improves the plugin? This is an actual (not sarcastic) question because I’m sure you see something that I miss in all this.

    I would really appreciate an answer,
    thank you

    Hi @takayukister,

    sorry for pinging you, but are there any plans on fixing this issue?

    It causes troubles on a client site and I needed hours to find this thread. And of course, deactivating the plugin is not a real option.

    Any feedback is highly appreciated. Thank you!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Latest v5.4 and deferred JS issues, possible release of update?’ is closed to new replies.