Twitter Timeline Widget Not Showing Up
I had a bug that I ran into today that had me really scratching my head. I needed to place a normal timeline widget on a website for a client. The widget was nothing special, just a default widget that Twitter allows you to grab from their widget page – Twitter Widgets. When I pasted the code onto my page nothing showed up except the text “Acme’s Tweets”. That isn’t what I wanted. The facebook widget had worked fine and I had no reason to believe that Twitter’s widget wouldn’t work.
I created a new flat file to see if the code would work. When I pasted in the code and saved the widget popped up just like I would expect. I started googling for errors that some other developers may have encountered and hopefully resolved, but nope – no such luck.
The next thing I tried was to see if I had some kind of configuration wrong when I set up the Widget. I looked and looked but nothing seemed wrong.
I started by eliminating half of my includes and saved. The widget still worked. My problem was in the other half of the files. I excluded the last half of my includes and it failed. So now I know my error is in the last few linked files. I commented out the first file – prototype.js. My widget worked. I uncommented it. It failed. There’s my issue.
I thought that since Prototype is the issue – maybe there was a newer version that might have the problem fixed. My version was 1.6. I went to Prototype’s website to see what versions were available; Prototypejs.org. At the time of this post 1.7.2 was available. I downloaded the new framework and saved the file. I posted that to my live server and setup my script links and saved. It worked! Both the Twitter widget as well as Lightbox was now functioning. Updating my old Prototype.js code to a new version resolved the issue.