-
Notifications
You must be signed in to change notification settings - Fork 26
Instagram feed either not loading or loading intermittently #26
Description
Having a really strange issue that is only present on my website on the production server (everything seems to work fine in the dev server). I'm using Django 2.2.
The Instagram feed I'm trying to query doesn't display, or only displays intermittently (if I just keep refreshing the page sometimes the feed will display, and sometimes it won't). I'm not getting any errors in my gunicorn, django, or nginx error logs.
When I look at where the Instagram feed should be injected into the html using devtools there is an element of:
<div class="slick-track" role="listbox" style="opacity: 1; width: 0px; transform: translate3d(317px, 0px, 0px);"></div>
but nothing is inside it, and there isn't an empty div for each image URL pulled in so I know it's not even grabbing any URL's.
Here is my html for calling the Instagram client:
{% load instagram_client %}
<div class="gallery-slider-2 z-index">
<div class="gallery-active">
{% instagram_user_recent_media "nm_asian_family_center" %}
{% for media in recent_media %}
<div class="gallery-slider-img {% if forloop.counter == 1 %}slick-current{%endif%}">
<a href="//instagram.com/p/{{ media.shortcode }}" target="_blank">
<img class="grow-insta" src="{{ media.thumbnail_src }}" alt=""></a>
</div>
{% endfor %}
</div>
</div>
</div>
Everything displays fine when I look at the site in my django dev server. I've only had these issues on my production server, and all other static files are loading fine. I'm guessing it might be some server configuration?
Any help or guidance is greatly appreciated!
EDIT
it's also worth noting that the package had been working fine on my production server just a few days ago. I made no changes to the site between when it was working fine and when I started having these issues.