After upgrading my site to PHP 8.1 from 8.0, the WordPress dashboard now shows the following error:
Deprecated: is_dir(): Passing null to parameter #1 ($filename) of type string is deprecated in /chroot/home/ace3b3a5/f0691d1627.nxcli.io/html/wp-content/mu-plugins/nexcess-mapps/vendor/keycdn/cache-enabler/inc/cache_enabler_disk.class.php
My host is Nexcess. Is this the kind of error that needs to be fixed by Nexcess or KeyCDN?
]]>Hello, I discovered a compatibility problem with the CDN Enabler plugin in version 2.0.8
This line of code here effectively disables the output from WP-CLI when running commands using Pantheon’s Terminus interface:
// wp-content/plugins/cdn-enabler/inc/cdn_enabler_engine.class.php
Line 66:
ob_start( self::class . '::end_buffering' );
You can replicate this in a Pantheon Hosting WordPress environment, using the mu-plugin linked below and the latest version of Pantheon’s Terminus client:
https://gist.github.com/EarthmanWeb/b7f991ebb93f9132f9bd88f3b4bfbba8
Terminus: https://github.com/pantheon-systems/terminus
When I comment out that line in your code, the output resumes as expected.
For now, I have patched the plugin as shown in the attached screenshot, which allows for normal functioning but also fixes the conflict with WP-CLI:
Can you please recommend a better fix, if you can, as I am unsure if this will affect anything else unexpectedly? Thanks!
]]>Weird use case, looking to replace external calls (like to jquery.com or jsdelivr) to instead use my site’s hosted files?
Reason for this is I noticed China cannot load jsdelivr at all (I think it may be banned?) and seconds to load jquery.com resources. Worse, recaptcha is also banned due to it being Google, so 1 of the sites I made for Hong Kong, hosted in a data center there, could not load in China!
It was a frustrating experience to say the least. I had to manually search/replace code for some of the plugin widgets to use my own enqueued js file instead. Obviously, that is not ideal as a fix.
So I am wondering if CDN Enabler can do what I need? I use my site’s URL as the CDN url, to replace all external calls to my own site? Would that work?
]]>I unfortunately have to disable/enable the plugin which then requires me to do a few more tasks just to edit an Elementor page. Would be ideal if there was just a radio or toggle option to enable / disable the CDN from within the settings page.
]]>Within dev console I see a bunch of errors (80+) in regards to
“Cross-Origin Read Blocking (CORB) blocked a cross-origin response.”
The blocked files are the website’s js and css files which renders the Elementor page builder as useless – everything is messed up. This only happens when using a CDN, specifically this plugin.
]]>Hi.
Is there some way to include only one individual file?
I want include the logo of my site, that is a .webp file; but I would not like that all .webp images be included.
]]><font style=”vertical-align: inherit;”><font style=”vertical-align: inherit;”>Nel plugin CDN Enabler, se scrivo nell’Hostname “cdn.corsionline-pragmaticamente.com” oppure l’Url di Zona mi dice che l’hostname non è valido. </font></font>
<font style=”vertical-align: inherit;”><font style=”vertical-align: inherit;”>Me lo valido solo se scrivo semplicemente “corsionline-pragmaticamente.com”, ma poi il cdn non funziona.</font></font> Cosa posso fare?
Hello!
This is one of best plugin I’ve ever used. It’s really easy to use and gets the job done. But a minor issue, not sure whether this is only with my site though.
The fonts are not loaded via the provided CDN. Not sure if this the intended behaviour. I’ve checked that the .woff2 extension is not on the exclusions list as well.
Kindly look into this issue, looking forward to hearing from someone.
Best Regards.
]]>https://php.watch/versions/8.2/partially-supported-callable-deprecation
Deprecated: Use of "self" in callables is deprecated in /app/web/app/plugins/cdn-enabler/inc/cdn_enabler_engine.class.php on line 66
Probably best to update it? Thanks!
]]>Hello.
When using my hosting CDN in conjunction with your CDN Enabler plugin, there is a conflict with the Web Stories plugin (https://www.ads-software.com/plugins/web-stories/).
Here are two of my topics with the problem:
My old unresolved one: https://www.ads-software.com/support/topic/error-script-amp-onerror/
And my new (unresolved) one: https://www.ads-software.com/support/topic/error-script-amp-onerror-2/.
CDN Enabler plugin, adds to this piece of code
(“script[src=’//v0.js’]”) my CDN (of the form: dbgjqnlcpw0cnuyguiucqr4do40p1pkv.cdn-freehost.com.ua) and the result is: script[src=’//dbgjqnlcpw0cnuyguiucqr4do40p1pkv.cdn-freehost.com.ua/v0.js’].
Which appears to be causing the problem: https://search.google.com/test/amp/result?id=q7E6doduHMp4OCvPCaK3YQ.
Please tell me if this is your problem or the Web Stories plugin. And is there any way to solve this issue? Thanks in advance.
Hello Team,
This plugin help me a lot so i don’t need to change the URL the cdn one by one. But, there is problem here when the cdn has problem. So it would take time to fix the cdn problem, is there any way to revert the host url to the default? I tried deactive and delete the plugin, it wont help change it back to the default.
]]>We’ve been using the CDN plugin and KeyCDN for quite a while and had no issues. Whilst going through a testing cycle, we’ve discovered that when a product on a Woocommerce product page is added to cart, the page returned doesn’t use the CDN. All links for static content; CSS, JS, and images are to the “www” subdomain for the site, and not the “static” subdomain that we use for the CDN. So far we’ve not seen the issue on other pages.
]]>Inserting an image from the media library in the Gutenberg editor keeps the host URL (does not rewrite it), which is good. However, if the image is changed to a different size in Gutenberg, then the CDN rewrite happens, and the CDN URL for the image is placed into the post content.
This is problematic for two reasons:
Is there any way to make sure CDN Enabler does not rewrite URLs from within the Gutenberg editor?
Thanks.
]]>I am using WPML and WP Multisite. My first site is being synced to cdn but my other site having the same setting is not synced to cdn url. Let me know how I can configure the other site.
]]>Hello
This plugin does a great job of rewriting, but ignores AJAX requests.
In the past I used the CDN Mapping function of the Litespeed cache plugin and it kept rewriting even in AJAX requests, but in some current LMS sites I can no longer keep the classic cache active, only CDN and Object Cache.
Is it possible to create some hook via wp ajax{$action} so that url rewriting continues to be done on AJAX requests?
Thanks!
]]>The instructions don’t say what to put in the CDN Hostname field. Is it the CDN we’re using (Cloudflare)? Or our domain name?
Thanks.
]]>Hi,
I am using Cache Enabler together with WordPress CDN Enabler (both from KeyCDN). I also have Redis cache enabled on my server.
I do not seem to see the
” <!– Cache Enabler by KeyCDN @ Wed, 24 Mar 2021 00:00:00 GMT (https-index-webp.html.gz) –> ”
tag in the sourcecode of the pages.
Is Cache Enabler running?
Regards,
Arjan
Hi,
I am using following regex to exclude all trailing url from this point on.
/\/evenementen\/.*/
Now I am wondering if I also need to add the base url or if this regex is sufficient to exclude the whole page.
regards,
Arjan
Hi there
I solved CORS issue thanks your plugin.
When the api key expires the plugin stop working?
Thanks in advance.
I’m using “CDN enabler” and “CACHE enabler” plugins.
I want to serve from a CDN the html files generated by the CACHE.
I’m not worrying yet with the refreshing of the files, my main question is if that is possible using the current state of the plugins?
I’ve got the CDN Enabler plugin tied to my KeyCDN account. It confirms that my CDN is responding with a message of 200. However, I cannot find the Purge CDN button anywhere on the Admin bar. Is there additional setup that is required or a specific place this button is hidden?
]]>Hello:
Our website calls https://js.hs-analytics.net/analytics/1644494700000/5663459.js
When i activate cdn enabler, it changes the address adding “/cdn.example.com” like this https://js.hs-analytics.net/analytics/1644481800000//cdn.example.com/5663459.js
Obviously going to a 404 error.
Please is there a way to solve this issue?
Thanks in advance
Hi,
i’ve setup the plugin and change to a CDN hostname, but the URLs are not changing at all.
Do i need to setup anything else?
Hello,
I don’t want fonts loads from CDN because I get “‘Access-Control-Allow-Origin’ header is present on the requested resource.” so I added .woff and .ttf in CDN Exclusions but it still loads fonts from cdn address.
any idea how to fix this?
Does this plugin work with other CDNs like Cloudflare, or just KeyCDN?
If it does work with Cloudflare, what should I put in the CDN Hostname field? Looking around, I found a post that said with Cloudflare, you just use your own website domain url if the DNS record is set to proxied in Cloudflare settings, which it is.
]]>Hello, I am using your plugin, I have a KeyCDN account. I am also using WPRocket, with the CDN option enabled. I added the url for my CDN + config area only on media. But for a few days now, if I leave this option enabled, I have run out of images and CSS. When I deactivate it, everything goes back to normal but my CDN is not active. Why ?
Thanks
Best Regards
Nicolas
We have just discovered CDN Enabler and manually installed with a piece of code in the functions.php file. It is working really great.
Our website allows users to upload images to various galleries. The images are subsequently compressed using ShortPixel, which takes place after the images have been uploaded and cached in the CDN.
How can the larger images be deleted from the cache, so that they can be replaced by the compressed images?
]]>Hi there it’s me again.
Is there any way that we can rewrite external images to be served using cdn.
Like if I am loading the images from https://dl.dropbox.com/1.png then how can we make the image load from https://cdn.com/img/dl.dropbox.com/1.png.
Can we do that?
]]>Dear support,
Nice plugin, does the trick easily for a simple CDN. I noticed though that a few versions ago it was directory based which was fine. It isn’t anymore I notice. I actually want to serve only /wp-content and /wp-includes from CDN (with cache rules sitting on the CDN side). But how to prevent acces via CDN to /wp-login.php. I tried entering “wp-login.php” and “wp-login” as strings in the CDN exclusions but the /wp-login.php page still get’s served. Is that expected behaviour?
Thanks in advance for your reply,
Kind regards,
Joris.
]]>Here’s a quick patch for putting a checkbox on the admin page to allow you to toggle whether the url rewriting is done when you’re logged in as admin. This way you can test local versus cdn fetches.
I also resize the exclude box to be more useful and also be horizontally resizable.
Thanks for the simple and clean plugin,
Chris