Error: undefined Swal is not defined
-
Hello im using this plugin along with nginxfastcgi + redis object cache but im not able to setup this plugin properly
getting this error :
also from header
CF-Cache-Status EXPIRED
-
Hi @corus9,
Clear your browser cache and cookies to resolve this issue. You can also try opening your site in a fresh Incognito window and I’m sure you won’t face the issue there.hi i tried both still same issue , do you think fastcgi + redis is causing this issue ?
Hi @corus9,
No, it seems like browser caching issue. You are saying that this issue is happening in the incognito window as well?Can you let me know the steps you took to reproduce the issue? If you have any other CDN or caching please clear that as well and try.
yes in incognito still ive same issue, alternatively ive installed opera browser and tried still same issue.
so before this plugin my setup was : nginx fastcgi + redis + bunnycdn
current setup : nginx fastcgi + redis + WP Cloudflare Super Page Cache plugin
ive tried this plugin with default website without nginx fastcgi + redis and it worked fine without any issue. so im still guessing it must be bcos of fastcgi/redis
Hi @corus9,
The Swal is a javascript thing for showing alert messages. Have you tried clearing both FastCGI & Redis cache and try then to see if the issue still exists? It is really hard to diagnose the problem without actually facing it myself to debug more and see the main reason behind it. Let me know if the clearing fastcgi & redis cache works. If not, you have to send an email which is mentioned in the plugin settings with more details and I will dig further on this.Hi guys, I am having the same issue/error for the last 2 months. I have created a detailed video about this issue and sent it to the admin just now.
I know I should be creating my own separate ticket. I have sent an email to the admin from this link https://www.speedywp.it/contatti/
I gave the WordPress login details of one of my website where you can do all the tests. Once I get the issue solved, I will create another video and upload it on my YouTube channel so that other people can also get the fix.
I’m addressing the Error: undefined Swal is not defined that I came across while trying to purge/test cache. Looking at the console, I noticed that it was my security headers that were blocking the script from ‘cdn.jsdelivr.net’ that this plugin uses. After adding it in script-src, clearing all caches, it works just as it should – perfectly.
Just putting this out there someone could try to fix the problem.
To the devs: Could it be possible to host the javascript yourselves? BunnyCDN is dirt cheap for this application. If a plugin gets infected and delivers JS from cdn.jsdelivr.net, wouldn’t that put our websites at risk?
Hope this helps someone. Cheers!
To the devs: Could it be possible to host the javascript yourselves? BunnyCDN is dirt cheap for this application. If a plugin gets infected and delivers JS from cdn.jsdelivr.net, wouldn’t that put our websites at risk?
– I have made sure in the upcoming release the sweetalert is hosted locally. But it is not because of any security risk as there is no security risk of loading the script from jsdeliver CDN. But rather loading the script from jsdeliver means adding another extra network request to the browser while loading locally that is not needed, which will shave off a few milliseconds to nano seconds. Thanks for the sugesstion.
Thank you so much. Looking forward to the change.
Cheers!
Now the sweetalert loads from the local file from v4.5.3
The topic ‘Error: undefined Swal is not defined’ is closed to new replies.