Aramaech Posted December 28, 2020 Posted December 28, 2020 (edited) Hi all! I'm trying to install Widgetbot IO on my site. Widgetbot is a Discord bot, and installing it adds a Discord icon in the corner of your site which can be clicked and expands into a small chat window containing your Discord server. It requires pasting a small chunk of Javascript code ideally before the closing body tag. An example looks like this: <script src="https://cdn.jsdelivr.net/npm/@widgetbot/crate@3" async defer> new Crate({ server: '299881420891881473', channel: '355719584830980096' }) </script> Given that I no longer have a manual theme, but an easy mode editor theme, I opted to paste the code inside of a custom widget, using this plugin: Advanced Custom Widgets. • THE PROBLEM The result is that the button appears in the lower right corner, but clicking it to expand the Discord server results in an empty widget, as picture in the attached image. I've tried switching the theme to manual mode and pasting the script directly before the closing body tag, and it produces the same results. I use Cloudflare for a CDN and creating a page rule is an option. I've seen a couple IPS sites use this widget, so I know it's possible. I'm just wondering what's preventing it from working in my instance. Any help appreciated, thanks! Edited December 28, 2020 by RobotMonkeyHæd
Morrigan Posted December 28, 2020 Posted December 28, 2020 It probably is cloudflare but I wouldn't know for sure. It could also be just one of those "days" with widgetbot.io. They tend to have some issues sometimes. Did you verify that you can see the code and its not altered in the source code? Aramaech 1
Aramaech Posted December 29, 2020 Author Posted December 29, 2020 lol yea I know Widgetbot is like that, but it's working fine on my local ide. I just inspected the button and no the Javascript is not showing up there... Is it possible that IPE maybe removing the Javascript code segment? ...would it still do that if the JS is directly in the html template? If it's cloudflare... which I agree, sounds like the likely culprit, do you know how to get around that?
Morrigan Posted December 29, 2020 Posted December 29, 2020 I don't know what IPE is. IPS? No. But Cloudflare caches stuff. It could be the cache hasn't picked it up yet. It could also be the IPS cache. It might be good to clear IPS cache then the Cloudflare cache and see if it fixes the issue.
Aramaech Posted December 29, 2020 Author Posted December 29, 2020 (edited) Yes I meant IPS, sry. I tried clearing the sites cache, and Cloudflares cache. Didn't work. Would SSL interfere with this? Does it matter that it's on a subdomain (my live dev version)? Edited December 29, 2020 by RobotMonkeyHæd
Recommended Posts