- Posts: 24
COMMUNITY FORUM
K2 kills facebook when using JomSocial (Solved)
- frold
-
Topic Author
- Offline
- Junior Member
I was hoping to use K2 with JomSocial and the template JA Social from JoomlaArt.
When testing at my localhost and when installing on my live site www.studmed.dk - the login using facebook function doesnt work.
This is the popup I normaly get:

It just shows up in less then a nano second and then it is away just after I have installed K2. With nothing content, no user merge, just a plain vanilla installion.
Is that a known issue? How to solve it?
UPDATE:
This is how it look like when K2 is installed:
www.screenr.com/grf8
This is how it look like whit out K2, and this is how it should work!
www.screenr.com/Crf8
Please Log in or Create an account to join the conversation.
- frold
-
Topic Author
- Offline
- Junior Member
- Posts: 24
When K2 is installed there is added this JS to the html output:
<script type="text/javascript">
window.addEvent('domready', function() {
SqueezeBox.initialize({});
SqueezeBox.assign($$('a.modal'), {
parse: 'rel'
});
});
var K2SitePath = '/';
I dont understand that JS but could it be the reason?
Please Log in or Create an account to join the conversation.
- frold
-
Topic Author
- Offline
- Junior Member
- Posts: 24
frold wrote: <script type="text/javascript">
window.addEvent('domready', function() {
SqueezeBox.initialize({});
SqueezeBox.assign($$('a.modal'), {
parse: 'rel'
});
});
var K2SitePath = '/';
I dont think it that snippet that course the issue. I think that code comes from libraries/joomla/html/html/behavior.php - did remove that part and FB login still doesnt work...
I really hope someone can help, else Im not able to use K2 on my site... ;(
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- frold
-
Topic Author
- Offline
- Junior Member
- Posts: 24
Lefteris Kavadas wrote: Hi. Probably there is a javascript conflict causing all this. Are you getting any javascript errors? In the video it seems like the popup opens but closes immediately. Does this happen every time?
I dont get any errors in Firefox 15, not what I can see. Maybe i have to enable something?...
The funny thing If Im not logged in to facebook I get promted to do so, when I am the popup disapear quickly...
See here: www.screenr.com/DYf8
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- frold
-
Topic Author
- Offline
- Junior Member
- Posts: 24
The page is not a K2 item (Its JomSocial frontend), but the "problem" is first initiated when K2 is installed. Just after I installed K2.
So in some way it must be related to K2, but if it is a JomSocial or a template issue related to my joomlart template, I can´t say cause i dont have the skills.
Facebook login works great without K2 installed - I have used it for a year at my live site: www.studmed.dk
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- frold
-
Topic Author
- Offline
- Junior Member
- Posts: 24
Lefteris Kavadas wrote: The fact that it works no an other site that doesn't have K2 doesn't mean anything. I can post you several sites with K2 and JomSocial with Facebook login working normally. And since this page is not generated by K2 then maybe it's something else. Can you post a link to your site? Otherwise i am afraid i cannot help you further.
I did now installed K2 at my live board: www.studmed.dk
Please let me know when you have tested it, cause then I will uninstall K2. Cause, as you understand, et blocks the login of facebook users...
I really appreciate your help!
Please Log in or Create an account to join the conversation.
- frold
-
Topic Author
- Offline
- Junior Member
- Posts: 24
I can see my menu is not working either when K2 is installed.
All the items: Forum, Afstemninger etc should open up when mouse over...
Like here:

Edit: the menu works when you are on pages like: studmed.dk/kontakt-os and studmed.dk/afstemninger but not the front page....
Please Log in or Create an account to join the conversation.
- frold
-
Topic Author
- Offline
- Junior Member
- Posts: 24
Please Log in or Create an account to join the conversation.
- frold
-
Topic Author
- Offline
- Junior Member
- Posts: 24
Now I did spot it down to k2.js
When I remove the content in that file every thing works great.
Im not able to spot what specific in the file that course the problem, but when I delete the content in that file and uploads a empty k2.js and empty my cache every things works again: my menu, facebook login...
Any ideas what could be wrong in it?
This is the content of my k2.js
pastebin.com/ub3FRU4G
Please Log in or Create an account to join the conversation.
- frold
-
Topic Author
- Offline
- Junior Member
- Posts: 24
I think I did solve it.
It seems like there is a problem when using a joomlart template.
When doing so and T3 optimize the js files.
And there is something that is messed up when T3 try to optimize k2.js
When I did add (the original) k2.js into the fields Optimize Exclude in my template control center every things work. Now the js filed is called like:
<script src="/components/com_k2/js/k2.js" type="text/javascript"></script>
instead of in a compiled file like:
<script src="/index.php?jat3action=gzip&jat3type=js&jat3file=t3-assets%2Fjs_58988e.js" type="text/javascript"></script>

Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- Vincent Nonnenmacher
-
- Offline
- New Member
- Posts: 1
I got the same one and from a non T3 template (no framework).
I think it is because I removed all mootool scripts (including modal.js) and got the same
error.
Sound like there is still a dependency from K2 to moo tools, on this SqueezeBox that is all around the K2.js code.
The included hook (in my case components/com_ninja/html/behavior.php), give the same error as reported :
joomla25:38TypeError: 'undefined' is not a function (evaluating 'window.addEvent('domready', function() {
SqueezeBox.initialize({});
SqueezeBox.assign($$('a.modal'), {
parse: 'rel'
});
})')
seems to come from an included plug-ins (ninja_board) that relies on the koowa framework in this file
components/com_ninja/html/behavior.php around lines 201 :
// Attach modal behavior to document
$document->addScriptDeclaration("
window.addEvent('domready', function() {
SqueezeBox.initialize(".$options.");
$$('".$selector."').each(function(el) {
el.addEvent('click', function(e) {
new Event(e).stop();
SqueezeBox.fromElement(el);
});
});
});");
Is there is a document way to remove front-end dependency on mootools ?
Please Log in or Create an account to join the conversation.