• Resolved Joe Fawley

    (@notrob0t)


    Hi, I’m having issues with mixed content being loaded through CSS files that Hummingbird is combining.

    It is fine of a few days, but every so often it generates a new version of my CSS and all relative paths have been given an https:// prefix.

    Please you could advise of why this could be happening (no https:// is present in code or database).

    I would prefer not to have to load an SSL plugin, as there is no other issues regarding this on the site.

    Many thanks.

    • This topic was modified 3 years ago by Joe Fawley.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @notrob0t

    I hope you are doing good today.

    In the first place please track in which file this is located. As for Hummingbird, no matter if this is free or Pro version (serve files from CDN) the main issue should be visible as well without Hummingbird (mixed content issue). If you track the main file which calls the font or an image via HTTP:// you will need to correct this directly in that file or report it to that theme/plugin author.

    Kind Regards,
    Kris

    Thread Starter Joe Fawley

    (@notrob0t)

    Hi, thanks for your reply.

    The file that calls the font uses a relative path (http nor https is being explicitly stated).

    The issue doesn’t appear when Hummingbird is disabled. When Hummingbird is processing the CSS, for some reason it is prefixing the relative path with https:// – despite everything being set up on the site to use SSL. (Options for site path etc all use https://)

    I have seen there are similar issues other people have encountered with this, but I can’t see a definite explanation or fix, as it seems people have contacted you directly:

    https://www.ads-software.com/support/topic/mixed-content-error-21/

    Anything you could do to shed some light would really help. My current fix is to hardcode the CSS paths with https:// – but this causes some issues when I’m testing on staging or local versions.

    Kind regards.

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @notrob0t

    Thank you for the update.

    The issue, in that case, was related to hosting, for some reason hosting is calling the CSS on HTTP and then the redirect to HTTPS happens, a solution for this is using this code: https://gist.github.com/patrickfreitasdev/e8092a06a700e194ed872b0b6d979076

    You can use it a mu-plugin following this guide https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Let us know the result you got,
    Best Regards
    Patrick Freitas

    Thread Starter Joe Fawley

    (@notrob0t)

    Thank you for your reply, this looks very promising. I’m going to give this a try. I will update if this resolves the issue.

    Appreciate your help.

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @notrob0t ,

    We haven’t heard from you for several days now, so it looks like the problem was solved with the custom code.

    Feel free to re-open this ticket if needed.

    Kind regards
    Kasia

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Mixed content issues from relative urls’ is closed to new replies.