David Nguyen
David Nguyen

Reputation: 8508

Facebook Like button throwing Javascript errors

Recently I've been having troubles with displaying the like button on my homepage, no code was changed so I believe Facebook may be the culprit but I'm not 100% sure. Originally it was throwing "bootloader is undefined" errors in two places:

<script type="text/javascript">Bootloader.setResourceMap({"KhOUG":{"type":"js","src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/yo\/r\/wFcdvtg8yWA.js"},"uBXoU":{"type":"js","src":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/yg\/r\/vnWtCAcBiXn.js"}});

And:

Bootloader.configurePage([]);

Both occur after the page querys the http:///www.facebook.com/plugins/like.php page.

But now it's throwing "bagofholding is undefined" error on:

function muffinize(d){var c='a';var b='d';var a=[c,b].join('');return d.replace(/muffin/g,a);}window.Util=window.Util||{warn:bagofholding,error:bagofholding,info:bagofholding,log:bagofholding,stack:bagofholding};if(typeof console=='undefined')console={log:bagofholding};

The Facebook Like button is implemented using the AddThis service but I checked all the lines of code and they seem fine. It doesn't seem like other sites are having this issue as well. All the errors are on Facebook's side.

It doesn't work here: http://importbible.com/2011/05/02/papercraft-skills-2012-audi-a7/

But works here: http://importbible.com/shop/shirts/group-buy/seventh-heaven-shirt/

The only thing I could think of that may cause issues is the HTML5 Boilerplate .htaccess file.

Upvotes: 1

Views: 2431

Answers (3)

bigp
bigp

Reputation: 11

in my case my error was coming from having "share" buttons. The script for share buttons also defines "FB"... so the new "like" script and the old "share" script conflict. Once I removed the old script everything was fine. (However, "share", is better for my particular site...)

Upvotes: 1

David Nguyen
David Nguyen

Reputation: 8508

After hunting around I found the answer, some of the meta data on my website was preventing the Like page to scrape my page. Using the Lint tool I was able to fix the errors on my page:

https://developers.facebook.com/tools/lint/

Upvotes: 0

FiveTools
FiveTools

Reputation: 6030

I seem to see the 'Bootloader is undefined' error when I set the href attribute of the fb like button to a non-existent page (a page that can't be accessed by the fb script file - such as the url on my dev machine / localhost).

Upvotes: 0

Related Questions