SOLVED: Nonce problem with “Load more button”

Hi,

I’ve created some “Load more” buttons with the Bricks built-in interactions.
However, after caching by LiteSpeed Cache, the buttons no longer work. I saw from the inspector that the nonce disappeared.
I’ve contacted LSC and they ask me for the nonce name Bricks used on that load more button. So, what is the nonce name?

Thanks!

Hi @ppt ,

As per our email conversation, it’s not a bug from Bricks.

In your LiteSpeed cache plugin, you should set the cache TTL lesser than 8 hour ideally.

This is because WordPress nonce is only valid for maximum 12 hours. If your page cache is more than that, the expired nonce will be used when using in Load more AJAX calls, then you will encounter the issue.

Reference: Nonces and Cache Lifespan - WP Rocket Knowledge Base

Example of TTL setting

Meanwhile, we already have a TO-DO improvement task to generate new nonce if expired.

Regards,
Jenn

1 Like

That really helped and the problem is solved.
Thanks a lot!

1 Like

Hi guys,

We’ve fixed this issue in Bricks 1.11 BETA, now available as a manual download (Bricks – Account)

Please let us know if you are still experiencing issues.

You can see the full changelog here: Bricks 1.11 Changelog – Bricks

As with any beta release, please do not use it on a production/live website. It is only meant for testing in a local or staging environment.

Best regards,
Matej