TypeError: a.get is not a function
gigibotte opened this issue · comments
Hey :)
Until few weeks ago everything was working fine. However now I get this error on my console. I'm using the last release 3.0.3
jquery.instagramFeed.min.js:1 Uncaught TypeError: a.get is not a function
at g (jquery.instagramFeed.min.js:1)
at h (jquery.instagramFeed.min.js:1)
at Function.a.instagramFeed (jquery.instagramFeed.min.js:1)
at home_minimal_footer.html:194
at dispatch (jquery-3.5.1.slim.min.js:2)
at v.handle (jquery-3.5.1.slim.min.js:2)
`
could it be a problem with jquery? or any idea how to solve this?
Thanks a lot
Could you try using a non-minified version jquery.instagramFeed.js to check if the error will persist?
hi @mahotilo !
Same error also in this case
Uncaught TypeError: $.get is not a function
at request_data (jquery.instagramFeed.js:149)
at get_data (jquery.instagramFeed.js:194)
at Function.$.instagramFeed (jquery.instagramFeed.js:397)
at home_minimal_footer.html:225
at dispatch (jquery-3.5.1.slim.min.js:2)
at v.handle (jquery-3.5.1.slim.min.js:2)
this is the jquery I'm loading (if needed)
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
Please show the order you are loading JS files and all the parameters (defer, async, etc)
This is the order I have the js files loaded
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src = "js/jquery.instagramFeed.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
(function($){
$(window).on('load', function(){
$.instagramFeed({
'username': 'briochehandmade',
'container': "#instagram-feed1",
'display_profile': false,
'display_biography': false,
'display_gallery': true,
'display_captions': true,
'callback': null,
'styling': true,
'items': 12,
'margin': 0.25
});
});
})(jQuery);
</script>
Thanks again for your help!
I added the first jquery as a trial but not working both with and without it.
Bootstrap is still working fine on the page
$(window).on('load', function(){
should be
$(document).ready(function() {
should not it?
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
Why are you loading both jQuery
and jQuery slim
? jQuery slim
(which doesn't have $.get
) is overriding jQuery
Just in case, this doesn't either make sense:
<script src="js/bootstrap.js"></script>
<script src="js/bootstrap.min.js"></script>
It would be like
<script src = "js/jquery.instagramFeed.js"></script>
<script src = "js/jquery.instagramFeed.min.js"></script>
Both files are the same but .min.js files are minified and optimized for production sites.
Hey! thanks a lot to both of you! (also for suggestions on scripts that should be loaded)
I am now not getting the error anymore (I'm getting the CORS one but I'm looking at previous issues to solve it)
Thanks again
Hey! thanks a lot to both of you! (also for suggestions on scripts that should be loaded)
I am now not getting the error anymore (I'm getting the CORS one but I'm looking at previous issues to solve it)
Thanks again
Set the host
param:
Recommended as Instagram is CORS restricted again:
host: 'https://images' + ~~(Math.random() * 3333) + '-focus-opensocial.googleusercontent.com/gadgets/proxy?container=none&url=https://www.instagram.com/'
hey @jsanahuja Sorry for commenting again the thread.
I still have the CORS issue both on my own project and on the index.html files of the repo.
I added the the host parameter as suggested but is not working (tried several times this week).
Any suggestion?
Thanks a lot! (Should I open a new issue?)