[SOLVED] Widgets no longer working since March 3rd update


#1

Sorry if this has already been discussed in another thread.

I recently added 2 widgets to my e107 based website. Everything was working fine until last week when the new changes came into effect. Suddenly the Widgets only show the link "Tweets by @canamvrl, instead of showing the actual Twitter feed as before.

I have gone through the recommended tests and have found that the widgets.js script is no longer running on my site.

Can someone please provide me with guidance on how to ensure that is enabled on my e107 based site?

Please keep in mind that I am fairly new to all of this so please keep it simple… :slightly_smiling:

Thanks in advance.

Link to site is http://canamvrl.no-ip.org The widgets should appear on the right side of the page. The blocks are there, but as mentioned, they only show the “Tweets from @canamvrl” link.


#2

It doesn’t appear to be related to the recent changes. Your site doesn’t include the script widgets.js. Add this to the end of your page and that should do it:

  

#3

Thanks. I finally got it working again.

The hard part was trying to figure out which file to add the script to.

Had to use the function theme_head() code in my theme.php file. Once I figured that out, everything came together. Addition was as follows:

function theme_head() {
	return '
		<script id="twitter-wjs" type="text/javascript" async defer src="//platform.twitter.com/widgets.js"></script>
	';
}

Also critical is the placement. It went immediately ahead of the //Layout section in the theme.php file

What is strange is that it worked fine for a while and then stopped working right after the changes were made on March 3rd. Probably a coincidence that sent me down a wrong rabbit hole.

Anyways, thanks for the help. Problem is solved.


#4