-
AuthorPosts
-
mmckeen Friend
mmckeen
- Join date:
- April 2006
- Posts:
- 112
- Downloads:
- 27
- Uploads:
- 12
- Thanks:
- 15
- Thanked:
- 5 times in 1 posts
September 13, 2010 at 12:22 pm #154276Whenever I go to an article for the first time, the Facebook Share button and the Facebook Like bar display correctly (as well as the Tweet button). When I refresh the page or go back to that page the Share button is gone and the Facebook Like bar is displayed as just a thin blue bar across the top of the article… has anyone else seen this happen? The Share and Like buttons work because I have been successfully able to do both from the site… I do have my developer ID loaded and I am using the most recent build for JA Social and the plugins …
Thanks!
hilfiger Friendhilfiger
- Join date:
- September 2010
- Posts:
- 76
- Downloads:
- 0
- Uploads:
- 11
- Thanks:
- 17
- Thanked:
- 6 times in 1 posts
September 13, 2010 at 6:42 pm #355408Yes, i had the same problem with 1.0.0 did not test with 1.1.0
From what i remember the problem was when browsing in mozzila.
I also know that facebook dosnt let admins (owners of facebook page) to like their own articles? try log in to another acount and test in all browsers.mmckeen Friendmmckeen
- Join date:
- April 2006
- Posts:
- 112
- Downloads:
- 27
- Uploads:
- 12
- Thanks:
- 15
- Thanked:
- 5 times in 1 posts
September 14, 2010 at 4:52 pm #355508Version 1.2 fixes the Like issue but the Share button still disappears…
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
September 15, 2010 at 9:16 am #355580<em>@mmckeen 193986 wrote:</em><blockquote>Version 1.2 fixes the Like issue but the Share button still disappears…</blockquote>
Dear mmckeen,
For this issue you can try as follow
Go to the plugins/content/plg_jafacebookshare.php file,Look for this function
[PHP]
function onAfterRender(){
global $mainframe;
if ($mainframe->isAdmin()) {
return ”;
}
$body = JResponse::getBody();//include FBML
$fbml = $this->getFBML();
if(!empty($fbml)) {
$body = JString::str_ireplace(‘</body>’, $fbml.'</body>’.”rn”, $body, 1);
//Declares a namespace for FBML tags in an HTML document.
//add xmlns:fb=”http://www.facebook.com/2008/fbml” to header tag
$regex = “/<html.*?xmlns:fb=”.*?”[^>]*?>/i”;
if(!preg_match($regex, $body)) {
$body = JString::str_ireplace(‘<html’, ‘<html xmlns:fb=”http://www.facebook.com/2008/fbml”‘, $body, 1);
}
}JResponse::setBody($body);
}
[/PHP]And change it to
[PHP]
function onAfterRender(){
global $mainframe;
if ($mainframe->isAdmin()) {
return ”;
}
$body = JResponse::getBody();//include FBML
$fbml = $this->getFBML();
if(!empty($fbml)) {
$body = JString::str_ireplace(‘</body>’, $fbml.'</body>’.”rn”, $body, 1);
//Declares a namespace for FBML tags in an HTML document.
//add xmlns:fb=”http://www.facebook.com/2008/fbml” to header tag
$regex = “/<html.*?xmlns:fb=”.*?”[^>]*?>/i”;
if(!preg_match($regex, $body)) {
$body = JString::str_ireplace(‘<html’, ‘<html xmlns:fb=”http://www.facebook.com/2008/fbml”‘, $body, 1);
}
}
if(JPluginHelper::isEnabled(‘system’,’jat3′)){
$key = T3Cache::getPageKey ();
if (($data = T3Cache::get ( $key )) && !preg_match(‘#<jdoc:include type=”([^”]+)” (.*)/>#iU’, $data)) {
$buffer = JResponse::getBody ();
T3Cache::store ( $buffer, $key );
}}
JResponse::setBody($body);
}
[/PHP]I hope this will help !
1 user says Thank You to Sherlock for this useful post
October 12, 2010 at 7:24 pm #358657I have had the same problem. But it only appears when I turn the cache on. If caching is on then the facebook share plugin dissapears after the second load of the page, but the retweet still remains.
Same thing with the JA Google Maps module. It stops working as soon as the cache is turned on?
What can be the problem?
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
October 14, 2010 at 2:06 am #358868<em>@sealr0x 198107 wrote:</em><blockquote>I have had the same problem. But it only appears when I turn the cache on. If caching is on then the facebook share plugin dissapears after the second load of the page, but the retweet still remains.
Same thing with the JA Google Maps module. It stops working as soon as the cache is turned on?
What can be the problem?</blockquote>
Dear sealr0x,
you can try to do as my above post,I think it will help !
October 20, 2010 at 6:47 pm #359732Hi, dathq!
I have replaced the method “onAfterRender” as you suggested, but still the FB Share button dissapears.
My Settings now is :
System – Cache : Disabled.
System – JA Compress : Enabled
Global Configuration : Cache Settings is ONJA Google Maps works, but FB share does not work, even after the changes you suggested.
Please advice …
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
October 25, 2010 at 1:19 am #360376<em>@sealr0x 199452 wrote:</em><blockquote>Hi, dathq!
I have replaced the method “onAfterRender” as you suggested, but still the FB Share button dissapears.
My Settings now is :
System – Cache : Disabled.
System – JA Compress : Enabled
Global Configuration : Cache Settings is ONJA Google Maps works, but FB share does not work, even after the changes you suggested.
Please advice …</blockquote>
Dear sealr0x,
I am afraid that you have to disable the joomla cache for this plugin working properly,there are no other ways.
cplanetdoo Friendcplanetdoo
- Join date:
- August 2011
- Posts:
- 25
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 8
- Thanked:
- 5 times in 1 posts
October 15, 2011 at 12:52 am #419424I’m having the the same issue regarding to the “JA facebook like it” plugin and cache settings
Is there any proper solution for this issue. I would like to keep the cache on.
A link or anything would be apreciated
cplanetdoo Friendcplanetdoo
- Join date:
- August 2011
- Posts:
- 25
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 8
- Thanked:
- 5 times in 1 posts
October 15, 2011 at 1:03 pm #419483<em>@Dat Hoang 194075 wrote:</em><blockquote>Dear mmckeen,
For this issue you can try as follow
Go to the plugins/content/plg_jafacebookshare.php file,Look for this function
[PHP]
function onAfterRender(){
global $mainframe;
if ($mainframe->isAdmin()) {
return ”;
}
$body = JResponse::getBody();//include FBML
$fbml = $this->getFBML();
if(!empty($fbml)) {
$body = JString::str_ireplace(‘</body>’, $fbml.'</body>’.”rn”, $body, 1);
//Declares a namespace for FBML tags in an HTML document.
//add xmlns:fb=”http://www.facebook.com/2008/fbml” to header tag
$regex = “/<html.*?xmlns:fb=”.*?”[^>]*?>/i”;
if(!preg_match($regex, $body)) {
$body = JString::str_ireplace(‘<html’, ‘<html xmlns:fb=”http://www.facebook.com/2008/fbml”‘, $body, 1);
}
}JResponse::setBody($body);
}
[/PHP]And change it to
[PHP]
function onAfterRender(){
global $mainframe;
if ($mainframe->isAdmin()) {
return ”;
}
$body = JResponse::getBody();//include FBML
$fbml = $this->getFBML();
if(!empty($fbml)) {
$body = JString::str_ireplace(‘</body>’, $fbml.'</body>’.”rn”, $body, 1);
//Declares a namespace for FBML tags in an HTML document.
//add xmlns:fb=”http://www.facebook.com/2008/fbml” to header tag
$regex = “/<html.*?xmlns:fb=”.*?”[^>]*?>/i”;
if(!preg_match($regex, $body)) {
$body = JString::str_ireplace(‘<html’, ‘<html xmlns:fb=”http://www.facebook.com/2008/fbml”‘, $body, 1);
}
}
if(JPluginHelper::isEnabled(‘system’,’jat3′)){
$key = T3Cache::getPageKey ();
if (($data = T3Cache::get ( $key )) && !preg_match(‘#<jdoc:include type=”([^”]+)” (.*)/>#iU’, $data)) {
$buffer = JResponse::getBody ();
T3Cache::store ( $buffer, $key );
}}
JResponse::setBody($body);
}
[/PHP]I hope this will help !</blockquote>
Well I tried the above for the plg_jafacebooklike.php and i think it works fine now. Thanks!!
-
AuthorPosts
This topic contains 10 replies, has 5 voices, and was last updated by cplanetdoo 13 years ago.
We moved to new unified forum. Please post all new support queries in our New Forum