Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I had a problem with Mixed content because a website that I am working on was loaded over HTTPS, but the image's src was on HTTP (This content should also be served over HTTPS).
I changed the absolute path of the images to the relative one. It solved the problem for me. Maybe someone had the same problem, so I am creating this issue.
Comment | File | Size | Author |
---|---|---|---|
#5 | mixed_content_image-2908035-3.patch | 694 bytes | TheNoOne |
Comments
Comment #2
joco_sp CreditAttribution: joco_sp commentedI had this problem on 8.x-1.4
Here is the patch.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous at Cheeky Monkey Media commentedIs the image coming from an image field?
I just tested this on a site I've got running on https, and I didn't run into any mixed content issues, the url to the file was https for me.
Potentially a cache issue, with the page cached on http before being viewed on https?
As much as this is a relatively small change, I'm curious how the url even got to http while on https - maybe there might need to be a core bug somewhere as well?
Comment #4
criscomWe have the same issue with colorbox 8.x-1.4. Applying the patch didn't resolve the issue for us.
What is interesting is that the colorbox images' path is absolute.
<a class="colorbox js-hide cboxElement" data-colorbox-gallery="gallery-slideshow-38-field_multiple_images-iltp_zAktAU" href="http://www.mysite.com/sites/default/files/styles/open_graph_image/public/images-content/F1000153.JPG?itok=fz8pw8Y4" title="Yuemdemu"></a>
While images from normal image fields have a relative path.
Comment #5
TheNoOne CreditAttribution: TheNoOne commentedThis patch fixes the problem for us.
Comment #6
rudam CreditAttribution: rudam commentedSame as criscon, the patch does not resolve my issue... images still on HTTP.
Comment #7
criscomWhich patch did you try, Rudam? Patch in #5 fixed it for us.
Comment #8
Neslee Canil Pinto