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.
If a video is posted on Instagram only the text associated with post is pulled through. This then pushed the whole gallery of other images out of alignment. Please see image attached.
Comment | File | Size | Author |
---|---|---|---|
#12 | instagram_feed_thumb_url_signature_removal-2945078-12.patch | 802 bytes | luisnicg |
#8 | delete-import.png | 46.83 KB | mattgross |
#2 | instagram_feed_thumb_url_signature_removal-2945078-1.patch | 921 bytes | Jānis Bebrītis |
image.png | 266.34 KB | Road Kill |
Comments
Comment #2
Jānis Bebrītis CreditAttribution: Jānis Bebrītis at Wunder commentedChecked the feed, structure still seems the same, thumbnail URLs work too, but database has invalid thumb URL - it returns "URL signature expired" when loaded.
This could be temporal fix, but removing signature from instagram thumbnail URL solves the issue for new items.
Solution found here:
https://github.com/stevenschobert/instafeed.js/issues/549
https://stackoverflow.com/questions/47668014/instagram-feed-api-media-ur...
As of existing items - you have to locate them in table `instagram_social_feed_photos` and remove those rows. Rerun cron (or `drush ev 'instagram_social_feed_cron()'`), items will be re-imported along with creation time so they will be sorted correctly in block too.
Comment #3
capysara CreditAttribution: capysara commentedPatch applied cleanly to 7.x-1.5. I just deleted all the photos and then re-ran the import. It appears to work, but I believe that the URL expiration occurred a few days after the images were imported. I'll keep an eye on it to be sure it holds.
Thanks Jānis Bebrītis!
UPDATE: I've had this patch in place since last month and it doesn't appear to be working any more. In fact all of my images and videos thumbnails are gone. I'm not sure if it's a result of the patch or some other config on my site, but regardless, it's not working for me anyway.
Thank you again! I'll keep looking into this and update when I find a solution that works for me.
Comment #4
Jānis Bebrītis CreditAttribution: Jānis Bebrītis at Wunder commentedComment #5
Barnettech CreditAttribution: Barnettech commentedWe are running 7.x-1.5 and it did not pull in a video posting, just showed a broken image instead. Are others showing this as fixed in 7.x-1.5 ?
Comment #6
mattgross CreditAttribution: mattgross commentedPatch in #2 worked for us, after deleting all photos and re-importing.
It would be ideal if there were some way to distinguish videos from other types of media, that way we could put a play icon over the thumbnail or something.
(edit) We're using 7.x-1.5
Comment #7
Barnettech CreditAttribution: Barnettech commentedI just poked around for a long while, what were the exact steps to take to delete photos and reimport?
Comment #8
mattgross CreditAttribution: mattgross commentedAdded a screencap of the delete/reimport page (admin/config/services/instagram_social_feed/status).
There's a link underneath the Run button that allows you to delete all the photos, then Run re-imports the most recent 20.
Comment #9
Barnettech CreditAttribution: Barnettech commentedah thank you! I was blind (apparently) but now I can see it!
Comment #10
Jānis Bebrītis CreditAttribution: Jānis Bebrītis at Wunder commentedI removed missing images by copying instagram link from them and using it in drush command
then
drush cron
and it will pull the latest items again.Comment #11
arskiainen CreditAttribution: arskiainen at Mirum Agency commentedInstagram apparently fixed this on their end, so the patched version (#2) uses image urls that return Access Denied.
The stable works (for me at least) correctly without the patch now.
I'm closing this since it's no longer a relevant issue. I hope that's okay.
Comment #12
luisnicg CreditAttribution: luisnicg as a volunteer commentedI reversed the patch as @arskiainen suggested in #11. After doing this it worked but I get this error:
SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'user_id' at row 1
I changed the user_id from INT to BIGINT in case someone faces this issue.