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.
flickr_photo_img() is currently hard coding the http:// protocol for images from flickr.com
This is a problem when the user is on https://.
Comments
Comment #1
chrisguindon CreditAttribution: chrisguindon commentedComment #2
lolandese CreditAttribution: lolandese commentedComment #3
lolandese CreditAttribution: lolandese commentedError message after applying the patch and re-saving a node with Flickr Filter applied:
Warning: getimagesize(//farm4.static.flickr.com/3737/9247386562_0222511648_m.jpg): failed to open stream: No such file or directory in theme_flickr_photo() (line 322 of /home/martin/www/beige/sites/all/modules/flickr/flickr.module).
Furthermore the image links to
http://example.dev///farm4.static.flickr.com/3737/9247386562_0222511648.jpg
resulting in anThis image failed to load
error in Colorbox.Of course the issue on itself is valid and should be looked into.
Thanks.
Comment #4
lolandese CreditAttribution: lolandese commentedWe could just specify https:// regardless of the current protocol. It is a bit wasteful since we don't care to secure the transmission of an image unless it is necessary (when the visitor is using HTTPS).
Comment #5
chrisguindon CreditAttribution: chrisguindon commented+1 for using https:// instead of http:// or protocol-relative urls //.
We could also try to detect if the user is on HTTPS but I am not sure if it's worth the effort.
Here's a d8 issue about detecting if the drupal site is using HTTPS or not. It seems to get tricky when the site is behind a reverse proxy or load balancer that serves HTTPS to clients but communicates with the web server via HTTP.
https://drupal.org/node/313145
Comment #6
lolandese CreditAttribution: lolandese commentedTested and committed.
http://drupalcode.org/project/flickr.git/commitdiff/ed97c90
Thanks.
Comment #7
lolandese CreditAttribution: lolandese commentedExtended to sub-modules and administration pages.
Comment #8
lolandese CreditAttribution: lolandese commentedIn:
we can't use https, simply because the URL doesn't exist.
It would be interesting to test if when we enable 'License info' in the settings it leads to errors if used on an HTTPS site.
EDIT:
Yes, it does. See #2334425: SSL warning for cc-icons.
Comment #9
lolandese CreditAttribution: lolandese commentedRelated info:
New SSL Endpoints for the Flickr API | code.flickr.com
Comment #10
lolandese CreditAttribution: lolandese commentedAlso added icons font as a local file (cc-icons.ttf) instead of using a remote source.
The CSS points to the path relative to the folder where the css file itself resides (same folder ../flickr).
Comment #11
lolandese CreditAttribution: lolandese commentedhttp://drupalcode.org/project/flickr.git/commitdiff/866eea9
Comment #12
lolandese CreditAttribution: lolandese commentedComment #14
lolandese CreditAttribution: lolandese commentedhttp://drupalcode.org/project/flickr.git/commitdiff/0965058
Comment #16
lolandese CreditAttribution: lolandese commentedExtend https also for the slideshows, flash and non.
http://drupalcode.org/project/flickr.git/commitdiff/fe23c6c
Comment #17
lolandese CreditAttribution: lolandese commentedBetter title.