Topic-icon jQuery conflicts with JLinked

Active Subscriptions:

None
10 years 5 months ago #38305 by number17

7of9 wrote: Hi Alex,

The module in question supports two main features, in various social networks:
1. Display stream.
2. Follow.

You can actually see what it does if you click on the rest of the social network tabs.



Hi Alex,

You can see the demo in our site demo
demo30.joomlaux.com/social-media-tabs

Before install the jLinked, the LinkedIN Tabs look like in our demo
The topic has been locked.
Support Specialist
10 years 5 months ago #38314 by alzander
I understand what the module is supposed to do. I don't understand why you need the LinkedIn Javascript to be not-initialized. Do you ever call the IN.init function? If so, what do you initialize it with. If not, how are you loading some of those social widgets which require an App ID?

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

None
10 years 5 months ago #38333 by number17
Dear

As you know before, our module call the IN.js because in module javascript, we call IN.init() with none parameters.
The topic has been locked.
Active Subscriptions:

None
10 years 5 months ago #38461 by 7of9
Replied by 7of9 on topic jQuery conflicts with JLinked
Hi,

I have this problem for a very long time now. Could we get some more immediate answers in order to resolve this faster, please?
The topic has been locked.
Support Specialist
10 years 5 months ago #38464 by alzander
I don't know an answer for you, unfortunately. It seems there's a deep conflict between how LinkedIn wants it's API initialized, and how both of our extensions are doing so. We need to provide an API key for multiple features in JLinked to work. It's possible you could remove our in.js load and init call altogether from the jlinkedsystem.php file referenced above. That is required for most of the social widgets to function. But if you're only using the share button and authentication *and* the other extension is properly loading the in.js library on each page, that may work for you.

From our reading of the LinkedIn developer docs, the in.js file needs to be initialized with an API key to use the follow button. Is the other module *ever* using an API key? If so, when is it being used and why not in the init function?

I didn't develop the LinkedIn Javascript, so I can't tell you what it's requirements are or why it doesn't like what's happening. I can point you to the documentation for how to initialize it though, which is what we used in JLinked.

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

None
10 years 5 months ago - 10 years 5 months ago #38514 by 7of9
Replied by 7of9 on topic jQuery conflicts with JLinked
Hi Alex,

I only use JLinked for authentication. I cannot use the Sourcecoast widgets if you remember, because I had another problem I could not resolve in another thread. So I use another extension for those. Could you please direct me to how to disable the script load from JLinked? Also could you provide me with the documentation for how to initialize it though, which is what we used in JLinked.?

Thanks in advance.
Last edit: 10 years 5 months ago by 7of9.
The topic has been locked.
Support Specialist
10 years 5 months ago #38521 by alzander
In the /plugins/system/jlinkedsystem/jlinkedsystem.php file, around line 105, you'll see:
$doc->addCustomTag($inJS .
                    '<script type="text/javascript">' .
                    "jlinked.base = '" . JURI::base() . "';\n" .
                    "jlinked.return_url = '" . base64_encode($return) . "';\n" .
                    $initJs .
                    "</script>");
Comment that whole block out by putting /* and */ around it, like:
/*
$doc->addCustomTag($inJS .
                    '<script type="text/javascript">' .
                    "jlinked.base = '" . JURI::base() . "';\n" .
                    "jlinked.return_url = '" . base64_encode($return) . "';\n" .
                    $initJs .
                    "</script>");
*/
Let us know how that goes, and good luck,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 5 months ago #38532 by number17
Dear Alex

Thank you for your help. I made the change like you suggest, and I saw that our module working fine. But I need Manos check your module again, I hope it'll be fine.
The topic has been locked.
Active Subscriptions:

None
10 years 5 months ago #38534 by 7of9
Replied by 7of9 on topic jQuery conflicts with JLinked
Hi,

Yes the module works fine now, however when I try to login using Linkedin I get a 404 error for URL: direct.allmassage.gr/en/%BAw%5E~%29%DE
If I go back I see We were unable to find the authorization token in Linkedin.

Any ideas?
The topic has been locked.
Support Specialist
10 years 5 months ago #38684 by alzander
I see what's wrong. Instead of the update I mentioned above of wrapping the whole block with /* and */, try to update it so it looks like:
$doc->addCustomTag('<script type="text/javascript">' . 
                    "jlinked.base = '" . JURI::base() . "';\n" . 
                    "jlinked.return_url = '" . base64_encode($return) . "';\n" . 
                    "</script>");
That removes the $inJS and $initJS variables from that code on 2 different lines.

Please let me know if that gets you going!

Thanks,
Alex
The topic has been locked.