• Resolved Karla Mulder

    (@karla-mulder)


    Everything works fine until I used Autoptimize for faster loading. Nothing happens when pushing the send button on the form (scroll down to see it)

    But almost the same thing if I use WP deferred javascript. This time I get the message Hello, spam bot!

    Do you have any suggestions?
    At this moment I deactivated both plugins. It is a test site, if needed, i can activate one of them.

    I choose for the invisble captcha, the other one (V2) did not work.
    I hope you can help

    Theme is DIVI

    • This topic was modified 8 years, 4 months ago by Karla Mulder.

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Middag @karla-mulder;
    With a bit of (re-)configuration this can work when Autoptimized, have a look at AO’s FAQ for info on how to troubleshoot.

    Groetjes,
    frank

    Thread Starter Karla Mulder

    (@karla-mulder)

    Hallo Frank, mag het in het Nederlands? Ik heb eerlijk gezegd geen idee welke javascripts ik precies moet toevoegen als uitzondering. Ik heb er al wat mee zitten spelen, maar dat had geen effect.

    Ik denk dat we hier verondersteld worden in het Engels te communiceren Karla (er zijn ook NL fora hier)/ I think we’re supposed to communicate in EN here … 🙂

    What (if any) error do you see on the browser console when Autoptimize is active?

    Thread Starter Karla Mulder

    (@karla-mulder)

    Okay 🙂 I do not see any error, just nothing happens. Either with or without this code for making an exception in Autoptimize: wp-user-frontend, https://eetbaarnijmegen.nl/zes/wp-content/plugins/wp-user-frontend/assets/js/upload.js

    Please have a look at https://eetbaarnijmegen.nl/zes/test-2/

    A divi website, with only 3 plugins: user front end, autoptimize and asset queue manager.

    Page speed is never showing some user frontend user script is blocking, which I would like. So may be I do something wrong, or I just need another script to help blocking.
    I also tried twentyseventeen theme: same result: nothing happens

    OK, try adding the following to the comma-separated JS optimization exclusion list;

    , jquery/ui, tinymce

    some of those will show up as render-blocking, but sometimes a (wo)man’s got to do what a (wo)man’s got to do, right? 😉

    Thread Starter Karla Mulder

    (@karla-mulder)

    Thanks for thinking with me 🙂

    I tried, helas, but no, this does not work either.

    I found out that other ways of optimizing javascript (like in the Divi theme) also have this effect.

    The code is now filled in, so you can see what happens.
    I think it has got something to do with the captcha. Can I stop the captchathing just to find out?

    well, at least now the text editor is active on the “tip”-field so we are getting somewhere.

    but I do see “Invisible reCAPTCHA validation failed” as error in a popup, so it certainly seems related to that. maybe indeed confirm by disabling that?

    Thread Starter Karla Mulder

    (@karla-mulder)

    I would like to know how… The WP user front end plugin does not seem to provide this option

    I only just now saw the screenshots of your settings on the testpage 🙂

    can you remove everything in the “async javascript” field and instead go to AO’s “main” tab, click on “show advanced settings” button near the top-right of the page and add js/jquery/jquery.js, wp-user-frontend, jquery/ui, tinymce to the comma-separated Javascript Optimization exclusions there?

    Thread Starter Karla Mulder

    (@karla-mulder)

    I can not find the advanced settings on the main tab.

    But I found the solution:

    add_filter('autoptimize_filter_noptimize','noptimize_contact',10,0);
    function noptimize_contact() {
    	if (strpos($_SERVER['REQUEST_URI'],'test-2')!==false) {
    		return true;
    	} else {
    		return false;
    	}
    }

    Found on: https://ww.wp.xz.cn/support/topic/autoptimize-removes-recaptcha-from-contact-from-7/

    Have a nice weekend!

    Karla

    for the advanced settings, see https://imgur.com/a/34TX9 🙂

    but excluding the page from autoptimization is a good workaround!

    fijn weekend!
    frank

    Thread Starter Karla Mulder

    (@karla-mulder)

    Oh really, I had not seen that!

    Thanks, I will try that too,

    Fijn weekend,
    Karla

    Thread Starter Karla Mulder

    (@karla-mulder)

    Your solution is much easier; I tried and actually only had to add: tiny mce; the other 2 were already filled in. So it is just these three: seal.js, js/jquery/jquery.js, tinymce

    Than the captcha worked nice. The strange web world 🙂

    https://imgur.com/iAIbsq2

    Happy now 🙂 Thanks!

    you can even remove seal.js, exceptions notwithstanding it’s entirely useless really 🙂

    frank

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Captcha not working after optimizing jvascript’ is closed to new replies.