Menu doesnt stick to top when CDN is enabled

Hey guys,

This may not entirely be in the scope of support, but when I enable my CDN (keycdn) through the super cache plugin, the menu wont stick to the top of the screen anymore for non-logged in users.

The menu is supposed to move along with you when you scroll, staying at the top of your screen.

Now im sure this has something to do with a file being cached or otherwise being sideloaded by the CDN, but im pretty much in the dark about which file I should try to load through my own servers, or removing from caches in order to get it working again.

The site in question is https://storyteq.com/

As mentioned, it does work for logged in users, and for everyone when I disable CDN.
Any help is much appreciated.

EDIT: It appears to randomly work sometimes after purging my CDN. Sometimes it does, sometimes it doesnt, but the problem returns everytime I update something on the site.

EDIT2: In addition, cornerstone is unable to load with the CDN deployed. It returns an error that something is wrong in the frontend.

Hi there @Talmon,

Thanks for writing in!

This could be related directly to how the CDN setup, I do use KeyCDN and can’t say I’ve experienced this issue. Are you offloading all assets (JS, CSS etc). Or certain assets? In addition are you using KeyCDN in combination with a cache plugin? Or just the CDN on it’s own.

If you can let me know a bit more about the setup and I’d be happy to advise.

Thanks!

Thanks for the reply!

I’m using KeyCDN through the WP Super Cache plugin. I set up KeyCDN as a pull zone with custom SSL and tried tweaking several settings to get Cornerstone working again, but helas.
What I tried is setting expire in keycdn to 0, ignoring caches set to disabled, disabling caching cookies and stripping cookies etc.

In super cache im including the following folders: wp-content,wp-includes
Im excluding the following: .php, /x/#/ , although that last piece doesnt seem to work. (tried excluding the cornerstone backend that way)

Everything else should be run through the CDN, including JS and CSS etc.

As we speak the CDN is disabled, but the sticky menu seemed to randomly work again (even with CDN enabled). However, no matter what I tried, cornerstone gives an error with CDN enabled.

Thanks for your time. I know this isnt directly theme related so it much appreciated!

Cheers!

Hello There,

We will investigate this CDN issue further. Meanwhile, please clear your plugin cache first and then the CDN Cache. Have it in this sequence so that when the CDN cache regenerates, the new cache from the plugin will be serve to the CDN cache.

Hope this helps.

Thanks for the reply.
I have tried that. Several times now.

Refreshing the caches and purging the CDN results in sometimes having the menu bar working correctly, but never cornerstone.

KeyCDN asked me to try implementing their CDN through CDN Enabler instead of super cache, although both methods are officially supported by KEYcdn. Ill try that and report back wethered it fixed the issue or not.

Hi there,

That is a good way to make sure if the problem is the combination of the Cache and CDN or only the CDN. The other thing I have in my mind is the minification process.

Please kindly consider that we already minify all the theme and Cornerstone assets out of the box, and if the CDN or Cache plugin try to minify the assets you may get that kind of weird results.

I suggest that you search on the options of the cache or CDN services and make sure the minification option is off.

We had the same case scenario with another system called CloudFlare and the workaround was the link below:

https://xthemetips.com/using-cloudflare-rocket-loader-with-x-pro-and-x5/928/

I feel that this can be the same situation with the system you use.

Thank you.