By Sean Carney on Monday, 21 April 2014
Posted in Technical Issues
Replies 8
Likes 0
Views 1.3K
Votes 0
My site is broken because Javascript stopped working, I believe after setting up the CDN settings in EasySocial.
Please run a GTmetrix report at gtmetrix.com on https://www.starch-smart.com and then look at the "Avoid bad requests" recommendation at the top of the recommendations.

For some reason my domain name is being appended in front of the Amazon CloudFront.net domain name. I believe that I have configured both the NoNumber CDN for Joomla plugin to use the correct domain name (d1eie3fs4r8rkl.cloudfront.net) for the third distribution which is JS and CSS files. I also believe I have configured the Easy Social -> Settings -> System Preferences correctly. Do you have any idea why my domain name may be being appended in front of these .js files and the paths are incorrect as well as the actual file names are changed? For example here is an actual file on the CDN:
https://d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/oauth/facebook.js
But the path that is being requested is:
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/oauth/facebook.js.min.js

Here is the report from GTmetrix.com:
The following requests are returning 404/410 responses. Either fix the broken links, or remove the references to the non-existent resources.

https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/oauth/facebook.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/comments/frame.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/conversations/api.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/dashboard/dashboard.guest.login.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/followers/api.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/friends/api.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/layout/dialog.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/layout/elements.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/layout/responsive.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/likes/likes.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/locations/popbox.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/photos/photos.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/popbox/popbox.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/privacy/privacy.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/profile/popbox.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/reports/reports.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/repost/repost.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/search/toolbar.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/share/share.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/sidebar/sidebar.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/stream/stream.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/stream/video.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/toolbar/notifications.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/d1eie3fs4r8rkl.cloudfront.net/media/com_easysocial/scripts/site/users/login.js.min.js
https://www.starch-smart.com/d1eie3fs4r8rkl.cloudfront.net/media/foundry/4.0/scripts/history.min.js
Hi Sean,

This may not be your problem, but you mention a problem in the ES menu bar and that's what I was seeing when I ran into difficulty because I did not realize that the protocol had to be prep-ended to the CloudFront Url. So, in "EasySocial -> Settings -> System Preferences - CDN settings" be sure you have something like "http://a54dt232g8gqgti.cloudfront.net" and not "a54dt232g8gqgti.cloudfront.net" as the CDN Url.
·
Tuesday, 22 April 2014 01:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Sean,

You should run EasySocial in "Static" mode The settings is available at Settings > System Preferences
·
Monday, 21 April 2014 09:59
·
0 Likes
·
0 Votes
·
0 Comments
·
I just set it to Static. I had it as Optimized because there is a note that said to use Optimized if I was running multiple StackIdeas components on the site.
I am still have the problem where none of the javascript works in the EasySocial Menu bar.
I also ran GTmetrix again but it is still reporting the bad requests.
I have Javascript compression set to "Compressed". Should I maybe switch to Uncompressed?
I have Inline configuration set to No. Should I be changing that to Yes?
In order to have my site start working properly again I did just now turn OFF two of the settings you told me to turn on. I would like to turn them back on but if I do I will lose my Javascript again.
EasySoicial -: system Preferences -> Enable CDN and Client-side CDN have to be OFF for my Javascript to work and to make GTmetrix happy again. If I turn them on I will go from 97% to 91% immediately on my GTmetrix Page Speed result because of the 404/410 errors that appear on the site.
You are very welcome to login to my backend and turn those settings back to On in order to test things out. But, as of now turning those on breaks my Javascript.
Sean
·
Monday, 21 April 2014 10:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Sean,

This is probably because when you have turned on CDN, Cloudflare is activated and it would actually render those js files on the fly. Most statistics software would think that this is bad because it makes multiple requests but again, this is what Cloudflare does and there's no way around this
·
Monday, 21 April 2014 16:01
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you Mark,
I am actually using Amazon's CloudFront and not the CloudFlare CDN. :-)
So, I am thinking that if a person is using Amazon's Cloudfront CDN then they should NOT "Enable CDN" or "Client-side CDN" at EasySocial -> Settings -> System Preferences - CDN settings?
It does seem strange to me that without that setting all of the URLS that are being called for the Javascript are also URLS to files that exist within our filesystem. Once we turn ON those two settings then the URLs are all being written out to non-existent paths with our domain name appended in front of them. I think there may be a bug?
Sean
·
Tuesday, 22 April 2014 00:59
·
0 Likes
·
0 Votes
·
0 Comments
·
Ah yes, Eileen is right! I think that's why you are hitting this error. You'll need to set the protocol as the prefix.
·
Tuesday, 22 April 2014 01:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you Eilleen and Mark,
I did indeed not have a fully qualified URL. I just put it in with the https:// in front.
And, it appears to be the answer I was needing! :-)
I am very happy.
I love this forum!
Sean
·
Tuesday, 22 April 2014 02:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for updating Sean, glad that your issues are resolved now
·
Tuesday, 22 April 2014 03:40
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post