Mixed content on Cwicly Stylesheets & svg's

Hi all,

I have some mixed content issues with Cwicly I never experienced before on other builders in my setup (DO/Runcloud/let’s encrypt/HSTS.

at first all Cwicly Stylesheets were served over http. Somehow they are in database as absolute url’s (?) because after search replace that problem was gone.

Now I’m still stuck with svg’s served over http. see screenshot.

Schermafbeelding 2023-01-10 om 11.25.16

That may not be a chicly (theme) problem, but maybe someone can point me in the right direction how to get this svg/http problem fixed. thanks.

dev url: https://startcwicly.webmaat.dev/

Hi @webmaat,

I don’t think there is any instance where Cwicly uses absolute URL’s for any stylesheet… We use basic WordPress functions to retrieve the URL. When do you see an absolute URL in the database for stylesheets?
Likewise, I never experience mixed content issues on any of my installations (Runcloud, Cloudways, Ploi, cPanel, SiteGround etc…).

This would more likely be the case of your WordPress Address or Site Address (General Settings), that would not have the required HTTPS.

As for your SVG, is this in an image block and statically set? If so, if your WordPress URL setup was not correct, then at the time you added the image to the block, the WordPress Media manager will have given Cwicly the http:// version.
Simply re-attach the image?

Thanks for your quick response Louis.

ok, good to know.
I just replaced all http to https in database and problem with stylesheets was gone. So any thought how this is possible?

I have setup a new install and copied just the header to test and now show you what I see on a fresh new install: https://cwicly.webmaat.dev/
(see devtools)

and thanks. re-üpload did the trick on the svg files.

Thanks @webmaat.

This is inherently due to the where we place the stylesheets, in this case the uploads directory. This is an old bug in WordPress (that they won’t fix) which basically means that if you haven’t set your Site Address and WordPress Address correctly, the mixed content error will appear (and this is very common in the WordPress ecosystem).

The next update will provide a “fix”.

Hi @Louis Is it feasible to place these custom generated cwicly stylesheets in Media library instead of the uploads folder?

Hi @anon32808828,

I think this would result in the same mixed content issue unfortunately.

1.2.9.2.2 brings a fix to load stylesheets using the correct scheme.

@webmaat, I’d be grateful if you can let me know if this helps on your side.

Cheers,

1 Like

Ok @Louis! I was more interested from a different aspect. I am using a plugin to upload media library to S3. It allows me to sync multiple wordpress instances with a single media library. I also plan to use Cwicly on these instances and it will be amazing if Cwicly generated stylesheets were in the media library as those will get synced automatically.

Hi Louis, indeed this update did the trick. See https://cwicly.webmaat.dev

Thanks (again) for your quick solution.

(how come this doesn’t happen to a lot of others? Or are they all smart enough to know about this WordPress bug?)

Thanks for your confirmation.
A quick search on the web will show you this happens a lot.
I’m an advocate for not modifying basic WordPress functionalities (which is why this was left untouched). But seeing that users don’t seem to set their instances up properly, we have to make changes accordingly.

Man! I see what you mean! I was so much relying on my setup, (that takes care of this thing) that I forgot to bother setting op httpS on site address on a lot of installs last year or so…lol. ok. Thanks anyway for this ‘fix’

1 Like