bkrztuk wrote:Firebug console shows error from fb script :
FB.init has already been called - this could indicate a problem
and this can be a source of problems. Please for test disable the additional FB modules like "find us on facebook". The Twitter issue is related with tweets visibility in Twitter search, module will show only visible tweets and result you can test here by typing your username
https://twitter.com/search/Why your tweets are not visible ? Solution is here
https://support.twitter.com/articles/66018#
Hi,
I desactived the "like box" module which is actually "Social GK5", Firebug does not show that error, anymore, but I will get back to that once this like button problem fixed and take a look at it.
The issue with the like button seem to be coming from the "url" set in the code, more specificaly this line:
- Code: Select all
<fb:like href="/" send="true" layout="standard" show_faces="false" width="400" action="like" font="arial" colorscheme="light"></fb:like>
When surfing into the site and reading an article, the FB like button shows a large number of likes like it was referring to another site and not the one you're in, well, that is the case, since FB script actually consider the " href="/" " part as being it own site, as in
http://www.facebook.com! Try to click on send or like and then you get to share a FB page, not the actual page you're in!
Problem code is in this file: /templates/gk_publisher/html/com_content/article/default.php
I tried changing that line and setting manually an url, changing this:
- Code: Select all
<gavern:social><fb:like href="<?php echo $cur_url; ?>" GK_FB_LIKE_SETTINGS></fb:like></gavern:social>
With this:
- Code: Select all
<gavern:social><fb:like href="http://tourisme.nadorpresse.com" GK_FB_LIKE_SETTINGS></fb:like></gavern:social>
Then the problem is "partially" fixed, partially since using the like button in all articles makes you like the same one page set, which is the front page.
Knowing that the problem comes then from the $cur_url variable, checking on the same file we find this:
- Code: Select all
// URL for Social API
$cur_url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$cur_url = preg_replace('@%[0-9A-Fa-f]{1,2}@mi', '', htmlspecialchars($current_url, ENT_QUOTES, 'UTF-8'));
The first line seem to be OK, but removing the second line, that is supposed to clean the page url's special chars...etc fixes the problem!
My question now is, should we definetly get ride of that line, or fix it to make it do what it is actually supposed to do?
Regards.