Wordpress LScache Plugin: Divi Themes Email Optin Module Not Working with LiteSpeed Cache
Last Updated on: Wed, 15 Apr 2026 00:00:02 The Elegant Themes Divi Email Optin module (https://www.elegantthemes.com/documentation/divi/newsletter/) is not working with LiteSpeed Cache due to the nonce not being registered with the LiteSpeed API. The Optin module submits via AJAX and this stops working after the nonce expires every 12 hours or so until I manually flush the LiteSpeed cache. I checked out your documentation and found that I need to manually write a function to register the nonce with LiteSpeed: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:api#nonce_issues I checked the Divi code (et_pb_submit_subscribe_form() function in their includes/builder/core.php file) and confirmed that the nonce that I need to register is called et_frontend_nonce : https://paste.pics/8581c86b60529cfbb77a884bb7e3da84 In my child themes functions.php, I wrote a function to register this nonce: https://paste.pics/1325acb472e09f156f923e1c19f4a0e9 After enabling LiteSpeed debug logging for my Admin IP, I confirmed that it was being successfully registered! LiteSpeed is set to Cache Logged-in Users separately and of course the nonce that I see when logged into the site is different from the one that the public sees when accessing the site. From the debug log, I see that the et_frontend_nonce nonce is viewable at this link: https://www.jedduggar.com/?lsesi=nonce&esi=eyJhY3Rpb24iOiJldF9mcm9udGVuZF9ub25jZSIsIl9sc19zaWxlbmNlIjp0cnVlfQ%3D%3D&_hash=24c726023691f65f3a8944eca858e5e4 Last night when I went to bed the et_frontend_nonce for me logged into the site was c7c197cf4e : https://paste.pics/fb907d2cd485976e244fd056ffce2bf1 This morning when I checked the above URL it was supposed to be dbf5f48b06 . However, the source of the page for et_frontend_nonce is now displaying a string of cryptic characters when Im logged into the site: KIJ3M3 H20 A https://paste.pics/bacff9445ae74338729823c735248052 What is up with that??? If its any help, I found that the wp_create_nonce() call that outputs this nonce onto the page is inside of the et_builder_load_modules_styles function in the includes/builder/framework.php file and uses wp_localize_script : https://paste.pics/e7331cf0b0358156a79fa6a339511281 I have sent a status report to you as requested in your forum support request rules: Report number: JIAUCCJO Report date: 11/09/2019 16:57:34 So is it possible to use the Divi themes Email Optin Module with LiteSpeed Cache? The page I need help with: https://www.jedduggar.com So after a LiteSpeed cache refresh, the weird characters disappeared and the Optin Module appeared to be functioning normally for the past several days! So I re-rolled my code in functions.php as a simple plugin that fixes the Optin Module and other frontend features (e.g. AJAX pagination, A/B testing) in both the Divi theme and Extra theme if ESI is enabled in LiteSpeed settings. It registers all of the necessary frontend nonces for these themes: ? https://github.com/robertstaddon/litespeed-divi-fixes ? https://github.com/robertstaddon/litespeed-extra-fixes Right after switching over to these plugins, I again found the weird characters being spit out where the nonce should have appeared: https://paste.pics/bacff9445ae74338729823c735248052 However, I flushed all the LiteSpeed caches again and after that the site started working properly. It might be nice if you could consider register these nonces as part of your core plugin for anyone using the Divi or Extra themes. Will pass to our test team to reproduce it. Thanks for the info. FYI, we did have a 3rd party code for DIVI but didnt include the nonce you mentioned above, its in https://github.com/litespeedtech/lscache_wp/blob/master/litespeed-cache/thirdparty/lscwp-3rd-divi-theme-builder.cls.php#L41 Also, we will add a new option to ESI setting, where allows you to set those nonces without writing codes. Hope this can help. For the weird chars, our team will try to reproduce. In the meanwhile, do you mind to try turn on debug log, and check the log when you got the weird chars? That may help debug.
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference