• Resolved Pierre_02

    (@pierre_02)


    Hi.

    I’ve noticed a long waiting for response from admin-ajax.php asking for “forminator_get_nonce”.

    Is there’s a way to “bypass” or improve this important optimization aspect please?

    TIA.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I believe in normal cases form submission should be optimized. Do you happen to be accepting large file uploads in your form?

    Try changing the setting you have in Form > Edit > Behavior > Method from whatever you have it set to, to the other option and see if that helps.

    Can you please provide an export of your form and share it here via a PasteBin link so people can take a closer look.

    Plugin Support Pawel – WPMU DEV Support

    (@wpmudev-support9)

    Hello again @pierre_02 !

    In this case it’s usually fairly normal for the admin-ajax request to take a bit longer. Admin Ajax is used to update the page dynamically without reloading in WordPress and by definition, requests to that endpoint can’t and aren’t being cached. So it’s going to be as fast as the site is usually for logged-in users (skipping cache).

    A possible solution here would be to try this snippet:

    <?php
    function wpmudev_forminator_ajax_load_without_nonce() {
    	$_POST[ 'nonce' ] = wp_create_nonce( 'forminator_load_module' );
    }
    add_action( 'wp_ajax_forminator_load_form', 'wpmudev_forminator_ajax_load_without_nonce' );
    add_action( 'wp_ajax_nopriv_forminator_load_form', 'wpmudev_forminator_ajax_load_without_nonce' );

    This will remove the nonce and the check for it, so it is possible the form could be submitted multiple times if someone clicks the button multiple times in short time.

    Warm regards,
    Pawel

    Thread Starter Pierre_02

    (@pierre_02)

    Hi

    Thanks Aakash and Pawel.
    Pawel, I tried your code by adding it to my functions.php file but it doesn’t change anything. The request of “forminator_get_nonce” is still present and the loading time is the same :(…
    As I use WP-Rocket to cache my page and as it automatically refresh page every 10 hours the wp_nonce “parameter” is not a problem for me.

    TIA.

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @pierre_02,

    Could you please share a page URL where we can notice this issue?

    Please also share your functions.php file so we can take a closer look at this.

    We look forward to hearing back from you.

    Kind Regards,
    Nebu John

    Plugin Support Kasia – WPMU DEV Support

    (@wpmudev-support2)

    Hello @pierre_02 ,

    We haven’t heard from you for several days now, so it looks like you don’t have any more questions for us.

    Feel free to re-open this ticket if needed.

    Kind regards
    Kasia

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Performance issue due to admin-ajax.php and forminator_get_nonce’ is closed to new replies.