'Invalid nonce' error in submit form

Your best bet is to disable caching on pages that include a form. We have included new logic to fetch the nonce token using AJAX to avoid issues related to caching, but it seems like this is still causing issues sometimes. Since we can’t reliably replicate the issue, there’s no way for us to work on a fix.

I think it’s best if you can ask Litespeed about how to add it to ESI. But note that you should use bricks-nonce-form not bricks-nonce now.

1 Like

thank you, from what i have read bricks-nonce was suggested by Bricks team that was what the OP stated, I cant find the original post though. thanks for the update.

adding the form is simple [bricks shortcode] >> [esi bricks shortcode] but I’m missing the styling which is attached to the actual id of the form by design, not css. (normally i would use [esi bricks shortcode class=“name_of_class”] but for id it does not work)

If there is a form in the footer on every page or there is a form call button on every page, this means that caching is completely disabled
:smile:

Yes you’re correct bricks-nonce was used for all nonces but now we have a dedicated nonce for the forum in v1.9.7

1 Like

Yup, that’s why the ajax-based nonce regeneration was implemented. Let’s hope we can get the steps to reproduce the remaining issue so we can improve it further :crossed_fingers:

thanks for this comment - so is there any info on how to safely implement this, does it work straight away with caching plugins or extra steps are required? ajax is enabled by default?

I was hoping to have pop-up forms on cached pages but the info about adding the bricks-nonce-form was an unknown step when implementing this. I wish I had known if and how the Bricks pop-up forms were correctly working with caching enabled.

muchas gracias.

Ajax-based regeneration works by default. But seems like a small % of visitors are still facing issues. But no one is able to replicate it reliably yet.