‘Page could not be reached’ error with facebook ‘like’ button

With facebooks release of the universal ‘like’ button, several webmasters complained of an error on clicking the button. Probably, the way facebook read/parses the sites had changed since the sites complaining of this error also had a problem getting the thumbnails of their links and any meta data, to show up in their facebook posts. A user figured out why

http://forum.developers.facebook.com/viewtopic.php?pid=220462#p220462

you can see the complete thread at

http://www.vergegraphics.com/blog/joomla/77-facebook-like-button-module (Verge graphics joomla module for the ‘like’  button works really well)

NOTE: before you try the below please backup the originals…

Now to get rid of the spaces in a joomla template I had to

1) go to in my templates/templatename/html/mod_mainmenu/default.php.
Line 33&35…removed the space.

NOTE: Simply deleting the space did not work I had to put in ‘  (for the geek in you-the entity used to represent a non-breaking space). So the lines looked like

$lspan = & $liFirstChild->addChild(‘span’, array(‘class’ => ‘l’));
$lspan->setData(‘ );
$rspan = & $liFirstChild->addChild(‘span’, array(‘class’ => ‘r’));
$rspan->setData(‘  );

2) Also had to change the space in the span “l” and “r” in functions.php (line 73) in the template root folder. Again I had to put in ` .

so it changed from

$result .= ‘<span><span> </span><span> </span>’

to

$result .= ‘<span><span>&nbsp;</span><span>&nbsp;</span>’

Now these files may not be in the same location in your case, you may have to hack the joomla core files in the module/mod_mainmenu/default.php. Its advisable, however, to copy the folders over to your template folder to create a template override

Hope this works for you as it did for us.

Note: if you are using word press…maybe header.php is the file to look at for the spaces in the spans?

Please feel free to enter any additions to the comments section…to help others, until facebook implements a fix.

Addition: See How Neth fixed the problem below…another probable solution if the above does not work for you.

Next? SCALE your business!
Get the latest tips, tricks, and topics in digital marketing. FREE!
Unsubscribe easily anytime.

jacobv

Vice President of Marketing @Fusebill | This Blog's Chief Content-Chef; words, images, analytics, some code | Google Analytics & AdWords | Martech Astute | Part-Time Moonshot Hunter | Hands-On Strategic Do-er of All Things Marketing

56 thoughts on “‘Page could not be reached’ error with facebook ‘like’ button

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.