Support » Plugin: Last.Fm Records » jQuery Usage on static HTML page

  • Resolved muskie


    I used this plugin previously and now that I’m done exams I decided to try and show data from on the following webpage

    I’m definitely rusty when it comes to JavaScript does it matter what version of jQuery I use does it have to be hosted locally? I get the following error after uncommenting out defaultthumb gif

    ‘_addTempCovers — undefined is not a function (near ‘….on(‘error’, function()…’)’

    You can see the whole stack trace unless I fix it tonight, today has not been a good JavaScript day. I tried putting the default image in with the javascript maybe I’ll try using a local copy jQuery too… I prefer to keep images in a directory other than with the .js files. It doesn’t seem to matter what I do, I spent a lot of time debugging APIs in the past some obscure artists can cause trouble, those with strange names etc. my account name is “Muskie” but I can’t swear I won’t listen to any music ever again.

    Old Code I need to update someday

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author jeroensmeets


    Hi Muskie,

    You jQuery version is 1.6.1, released in 2011 😉 wouldn’t hurt to upgrade a bit. Can’t find another reason why the code would fail. Let me know if upgrading helps.

    — Jeroen

    I have 1.6.1 locally and that did not work, I’ll try to switch to hosted version. I’m in China so I was using a VPN too, but I use jQuery on my homepage, blog etc. so I can definitely work with the VPN…

    Thanks for the quick reply I think I can get this to work eventually, just maybe not tonight.

    Plugin Author jeroensmeets


    Ok! Good luck and let me know if you need any help.

    Is it my public or private key that goes here: LASTFM_APIKEY

    It doesn’t seem to matter what I try I always get an error on the default here:
    ‘.attr(‘src’, _settings.defaultthumb)’

    Updating to jQuery 2.2.4 definitely helped a bit, eventually got some

    “Failed to load resource: the server responded with a status of 403 (Forbidden)”

    I’ll work on it after my day job, hopefully I have no code that really needs 1.6.1 I generally use the Google hosted version anyway but due to the Chinese firewall I think I tried to make the switch but somewhere something by someone is hardcoded into using Google’s version, too many libraries running on my website, but I’m way too busy to rebuild it from scratch.

    I always get the 403 forbidden and default covers, maybe my API key is expired or blocked or throttled.

    Plugin Author jeroensmeets


    Hi Muskie, if I try to open the URL that’s giving the 403 error, I see

    ({"error":10,"message":"Invalid API key - You must be granted a valid key by"});

    Seems to me your API key is not valid.

    Good eye, I’ve had an absolute horrible week, I literally moved out of my apartment to try and get some sleep so debugging this was not a priority.

    I have a valid key, but perhaps your documentation should say “public key” as in my try everything phase I tried with the private key there which obviously is a no no as it is passed in the URL string.

    It will require a lot of CSS niceties unless I can just use one of your two themes magically but it did fetch finally the last six tracks I listened to.

    Thanks for the help and the code.

    Plugin Author jeroensmeets


    Nice! Good to see you were successful in implementing my code.

    And thanks for the shoutout on Twitter, much appreciated.

    Greetings from this wet country,

    — Jeroen

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘jQuery Usage on static HTML page’ is closed to new replies.