× Joomla Facebook Connect support forum

Topic-icon All my JFBC links are wrong using Joomla 15 with lates jomfish in all

Active Subscriptions:

None
Hi

Since the start a year ago using JFBC (both extensions) I have had this problem:
The links that modules / / Facebook / incl. all extensions are showing is ending on: text?lang=en. The corect url is: en/text
What is wrong? how can it be fixed?
This is bad for SEO/Google
The topic has been locked.
Active Subscriptions:

None

iveth wrote: Hi

Since the start a year ago using JFBC (both extensions) I have had this problem:
The links that modules / / Facebook / incl. all extensions are showing is ending on: text?lang=en. The corect url is: en/text
What is wrong? how can it be fixed?
This is bad for SEO/Google

Hello,
JFBC is using Joomla to generate the URLs and Joomla uses its internal route mechanism.
so if the URLs are wrong, there might be a problem with the URL rewrite you are using in Joomla.

could you please show us an example so we could try and help you solve this?

Mati
The topic has been locked.
Active Subscriptions:

None
Hi Mati
Thanks
Please send me the way to send you login so you can see it,
The topic has been locked.
Active Subscriptions:

None

iveth wrote: Hi Mati
Thanks
Please send me the way to send you login so you can see it,

Hello,
we do not need admin access, just a simple link as an example of the problem.
anyway, you could always use the PM system here in the forum.

Mati
The topic has been locked.
Support Specialist
Another possible suggestion is to make sure the JFBCSystem plugin runs after any other plugins (except the Cache plugin). That should allow all the other routers on the site (like JoomFish or sh404SEF if you're using them) to run first. If that doesn't work, you can also try moving the JFBCSystem plugin to the first position, but that likely isn't the issue.

Otherwise, post the URL here (or PM Mati) and I'm sure we'll help you get to the bottom of it.

Alex
The topic has been locked.
Active Subscriptions:

None
Ok I will set it upm, and I am sending you a message now, please check you message box it is send to Alzander
The topic has been locked.
Support Specialist
I just responded to your PM. Once we can see a link that is generated badly, we can hopefully narrow the issue down.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
yes I have send you an image including link, have you checked..
The topic has been locked.
Support Specialist
Iveth,
Sorry for the delay. This was a new issue to us, which took a bit of investigation and experimentation with JoomFish to recreate and try to fix. We think we have a solution, but would love for you to test.

First, please edit the /components/com_jfbconnect/libraries/utilities.php file. A little over half way through the file, you'll see the following block of code:
static function getStrippedUrl()
    {
        $href = JURI::current();

        $juri = JURI::getInstance();
        // Delete some common, unwanted query params to at least try to get at the canonical URL
        $juri->delVar('fb_comment_id');
        $juri->delVar('tp');
        $juri->delVar('notif_t');
        $juri->delVar('ref');
        $query = $juri->getQuery();

        if ($query)
            $href .= '?' . $query;

        return $href;
    }
Please change that and replace with the following block:
static function getStrippedUrl()
    {

        $juri = JURI::getInstance();
        // Delete some common, unwanted query params to at least try to get at the canonical URL

        $router = JSite::getRouter();
        $vars = $router->getVars();
        unset($vars['fb_comment_id']);
        unset($vars['tp']);
        unset($vars['notif_t']);
        unset($vars['ref']);

        $href = $juri->toString( array('scheme', 'host', 'port')) . JRoute::_('index.php?'.JURI::buildQuery($vars));
        return $href;
    }
That will change the URLs for any comment boxes, Like buttons, the Open Graph URL tags and plenty of other URLs that are generated by JFBConnect. The good news is that after a week or so, it -should- automatically update any stream posts that already exists as Facebook starts seeing the new URLs.

Obviously test, a lot. We'll do some evaluation of this change for the upcoming 4.2 release, but I'm not sure if we'll include it. It's a big change and will require a lot of testing. Your feedback will greatly help! If it's not in 4.2, when that comes out, please post back here and we'll let you know where to make that change.. it will be in a completely different place.

Thanks,
Alex
The topic has been locked.