• Resolved ulrich_nielsen

    (@szarzene)


    Hi,

    if the main css is compressed, the background svg images are served through http for some reason. All paths are relative in my css. The https redirect is in place and functions perfectly otherwise. If i disable the compression, the mixed content error goes away. I’m not linking the site because it’s off right now, until i find a solution.

    It can be fixed through an SSL plugin — which i do on a different site — but it’s another plugin to install and i want to limit the number of plugins to the bare minimum.

    Any idea how to fix this? Thanks in advance.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @szarzene,

    Sorry, could we know what exactly you meant by the main CSS? Is it a file called main.css in the theme or any plugin side? or you meant the main CSS which would be style.css in a theme?

    Maybe there are any hardcoded HTTP URL called in the CSS side? In general, Hummingbird shouldn’t be causing any such anomalies, so I’m afraid, it’s tough to say what exactly is causing the issue without seeing the issue live.

    Any screenshots or link to the main file, or if there are any steps to replicate the issue it would be helpful in having a better idea regarding what might be causing it.

    Looking forward to your response.

    Kind Regards,
    Nithin

    Thread Starter ulrich_nielsen

    (@szarzene)

    Hi Nithin,
    yes it’s the style.css, as in a main css of my theme. Again, there are no hardcoded urls, only relative image paths like url(“images/background.svg”). It’s supposed to be interpreted as https.

    While i know Hummingbird is not supposed to break SSL, there’s no other explanation, as this issue is only experienced when the compression is enabled on the style.css. As soon as i turn it off, there’s no mixed content error. I’ll try to provide an url so that you can investigate. Thanks for the reply.

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @szarzene

    Thank you for the update.

    Are you using only the compress option or the inline option too?

    We can try to replicate this behaviour on our website too.

    Best Regards
    Patrick Freitas

    Thread Starter ulrich_nielsen

    (@szarzene)

    Hi Patrick,
    I’m only using the compress option. If i inline it too, it breaks some functionality (mobile menu). But inline is not important to me, only compress, so it doesn’t matter.
    Thanks for investigating.

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @szarzene ,

    I’ve tested this scenario on my site but I wasn’t able to replicate this issue. With compression on svg background didn’t switch to HTTP.
    What theme are you using on your site?

    kind regards,
    Kasia

    Thread Starter ulrich_nielsen

    (@szarzene)

    Hi Kasia,

    it’s a custom theme based on Primer by godaddy. But i made so much customization in the template files and css, it barely resembles the original theme now. However the only issue with it is what i mentioned, the svg background images are served through http. If it helps, i’ll try to reproduce the error (which i might be able to do by simply disabling the SSL plugin that i use). Let me check and if the issue persists, i’ll send you a link.
    Thanks for your help.

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @szarzene

    Thanks for additional explanation.

    There shouldn’t actually be any need to use any additional plugin for SSL as long as all the plugins and the theme are using correct code (so no “hardcoded” https:// prefix in URLs and URLs built-up dynamically based on WordPress core functions/template tags) and WordPress itself is configured for SSL.

    The latter means that “WordPress Address (URL)” and “Site Address (URL)” are both using “https://” prefix rather than HTTP. If URLs of those SVG images are not “hard-coded” with “https://”, that should be enough for Smush and other plugins to use correct protocol.

    But since you’re about to conduct some more testing, please do and keep us in a loop so we could eventually “drill down to the bottom” of it ??

    Best regards,
    Adam

    Thread Starter ulrich_nielsen

    (@szarzene)

    Hi Adam,

    i know this, i never use hardcoded urls. I’m not using Smush but a webp plugin called WebP Converter for Media. However it’s not affected in this issue, as the mixed content error pops up exclusively when there’s a background image specified in the css.

    File type doesn’t matter, it happens to png too, so i incorrectly stated that only svg images are affected.

    Normal images inserted into posts/pages are being served through https.

    Here’s the link, please take a look: https://wagnerlaw.hu/
    Console says only the bg images are broken.

    Plugin Support Saurabh – WPMU DEV Support

    (@wpmudev-support7)

    Hello @szarzene,

    First things first, I am extremely sorry for the delay in response here.

    I just checked the site and that looks good to me. Did you by chance revert the changes which showcased the issue replication? I do understand you may not be able to keep it as it is if that is a live site too. Could you please make the change back so that I could try and replicate the issue? Looking forward to hearing from you on it.

    Thank you,
    Prathamesh Palve

    Thread Starter ulrich_nielsen

    (@szarzene)

    Hi Prathamesh,
    yes i had to reenable the SSL-plugin just yesterday because, probably due to the broken certificate, the site basically disappeared from Google. I disabled the Really Simple SSL plugin but it does some permanent changes that enforces 301 redirection for https throughout the system, so even if it’s off the effect persists.

    What i know for sure is that
    – there was no hardcoded path anywhere in the css ever
    – all https redirects function properly, no other issue ever occured but the css bg images when HB compression is on for the style.css
    – .htaccess contained a http to https redirect before any plugin and worked ok
    – and of course the hosting server fully supports it

    If it helps, here’s the list of plugins that are currently active, although a plugin conflict seems unlikely (i checked with plugins disabled):
    Block Bad Queries (BBQ) 20200811
    Dark Mode 3.2.1
    Database for WPforms 1.0.0
    HTML Editor Syntax Highlighter 2.4.2
    Hummingbird 2.5.1
    Login LockDown v1.8.1
    Polylang 2.8.2
    Raw HTML 1.6.3
    Remove jQuery Migrate 1.0.2
    The SEO Framework 4.1.1
    The SEO Framework Extension Manager 2.4.0 by
    TinyMCE Advanced 5.5.0
    WebP Converter for Media 1.4.2
    WPForms Lite 1.6.2.2

    Plugin Support Saurabh – WPMU DEV Support

    (@wpmudev-support7)

    Hello @szarzene,

    The list does not look like it could conflict. Usually, to replicate the issue, we recommend working on staging sites. Would you be able to create a staging site on one of your temporary domains or sub-domains and help us with the link here to check that further? I’m afraid I only see this one way to replicate the issue and then try finding the solution as it would be pretty difficult in other ways to replicate the same. Looking forward to hearing from you on it.

    Thank you,
    Prathamesh Palve

    Thread Starter ulrich_nielsen

    (@szarzene)

    Hi Prathamesh,
    i’ll try to do that. It’d be nice to have an email where i can contact you directly so that you can close this thread. Thanks.

    Plugin Support Saurabh – WPMU DEV Support

    (@wpmudev-support7)

    Hello @szarzene,

    We recommend you to communicate here primarily but if for some reason you would like to keep that confidential, you can send me an email to [email protected] and use the following template:

    Subject: “Attn: Prathamesh Palve”
    Message: Your message and link back to this thread for reference

    We can mark this thread as resolved once we take this over on the mail and resolve it.

    Thank you,
    Prathamesh Palve

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Mixed content error’ is closed to new replies.