Topic-icon Facebook login does't work - very quick popup with no content

Active Subscriptions:

None
I have setup my website with the SCLogin, and both the Facebook button and the Google button show as requested.
The google login works just fine, but the Facebook login button just show a quick popup window for less than a second and then closes it again. The user is not created, nor logged in.

I tried changing different settings now, and with different Facebook Apps.

Can you please help me out?'

Thank you in advance.
The topic has been locked.
Active Subscriptions:

None
9 years 11 months ago - 9 years 11 months ago #44022 by varstars
This is exactly what was happening to me! There was a change in how facebook did their api so Sourcecoast had to update. You'll need update to the newest version.

I did the update and there was some change, but now I'm getting an all together different error. I've attached a link showing what it says:
File Attachment:
Last edit: 9 years 11 months ago by varstars.
The topic has been locked.
Support Specialist
Madsand,
I think your issue is related to some conflicting Javascript on your site. The following scripts are being included in different spots on your page, in this order:
http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js
http://gospelnation.dk/media/com_ohanah/js/jquery-ui-1.9.2/js/jquery-ui-1.9.2.custom.min.js
http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
Multiple jQuery loads *can* work on a page, but isn't recommended. The ordering of jQuery UI v1.9.2 before the jQuery 1.9.1 load could be problematic though.

With that, right when your page loads, the following Javascript error is occurring:

Uncaught TypeError: undefined is not a function jquery.lightbox-0.5.min.js:20

That's not an error from JFBConnect, but once one Javascript error happens, things generally start going south quick.

What I'd recommend is disabling the extra jQuery loads, if possible. That should improve page load time and decrease some conflicts.

If you can't do that, or want to test something else quickly, go to the JFBConnect -> Configuration area and enable the "Load jQuery / Bootstrap" setting. That will load a JFBConnect-specific version of jQuery which is only for our extension and won't conflict with, or be conflicted by, other extensions. It *should* get you going, but (again) other Javascript errors can prevent further execution of some code, which could prevent JFBConnect from authenticating properly.

Hopefully, something above helps get you going though.

==============
varstars,
Thanks for trying to help out with this post. I'm glad to hear JFBConnect v6.0.6 fixed some of your issues. We're still wrapping our head around the Facebook changes and will be putting up a blog post with good information on how it affects all of our users soon.

As for your issue, the activation link message is normal if you have activation enabled in Joomla and have configured JFBConnect *not* to skip activation.

The "Could not instantiate mail function" is a Joomla issue. There are 2 emails sent during registration (1x to admin and 1x to user) and neither of those could be sent. I'd recommend checking your Joomla -> Global Configuration area mail settings to ensure they are configured properly for your server. JFBConnect simply hands the mail off to Joomla and says "send".. beyond that, it's in Joomla's hand, and Joomla is throwing that error for some reason.

Best of luck,
Alex
The topic has been locked.
Active Subscriptions:

None
Thank you for your answer.
I want to fix the issue with the many jquery loading, but need to find out where the two google jquery comes from, and the error too.
What tool did you use to find the errors, and can you help me to get to the root of the problem - even though I know it's not included in your support, to deal with other extensions?
I would just really love to use JBFConnect, and can't as it is.

Thank you so much in advance.
The topic has been locked.
Support Specialist
9 years 11 months ago - 9 years 11 months ago #44095 by alzander
To see the errors, we're simply using the Google Chrome Developer Tools. Those are built-in to Google Chrome (and Firefox and most other browsers). Once a page is loaded, you need to use the Tools menu and select "Developer Tools" or "Javascript Console" and you can find the errors I posted.

As for what's including the other files, you can look at the HTML of the page and try yourself. It's difficult to be certain since there isn't an identifier as to what extension caused the inclusion. Looking at the following lines though, here are my guesses:

Uncaught ReferenceError: jQuery is not defined k2.js?v2.6.7&sitepath=/:9

That's a Javascript error from K2 because you've disabled jQuery in their extension. They need jQuery, and it's loaded on your page, but *after* the k2.js file that expects it. So, you need jQuery to be loaded, but higher up in the page.

Uncaught TypeError: undefined is not a function jquery.lightbox-0.5.min.js:20

I have no idea what's causing this error. The script inclusion is:
<script src="/media/com_ohanah/jquery-lightbox-0.5/js/jquery.lightbox-0.5.min.js" type="text/javascript"></script>
That's obviously from Ohanah, so hopefully they can help you determine the cause if it persists after the changes below.

Uncaught TypeError: undefined is not a function jfbconnect.js?v=6:86

That error is because the Bootstrap Javascript library is not included. Again, enable the "Include JQuery / Bootstrap" setting in JFBConnect to fix this and hopefully get all of our functionality going.

JQuery inclusions (in order of load)
<script src="/media/com_ohanah/js/jquery.min.js" type="text/javascript"></script>
That's Jquery 1.10.0, which is great and should be all you need. Ohanah is loading that, and if it's doing so on every page of your site, this should keep K2 happy. Just re-order the K2 system plugin *after* the Ohanah plugin so that K2 adds their k2.js file after this jQuery inclusion.
<script src="/plugins/content/jw_allvideos/jw_allvideos/includes/js/quicktimeplayer/AC_QuickTime.js?v=4.5.0" type="text/javascript"></script>
  <script src="//maps.googleapis.com/maps/api/js?sensor=false&language=da&key=AIzaSyCLiZ0dNahcukDdfMQo_Br3kz2FadpriEQ" type="text/javascript"></script>
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
  <script src="/components/com_dmk2maps/js/jquerynoconflict.js" type="text/javascript"></script>
I included a few lines here. The middle is jquery v1.9.1, which is a little older, but should be fine. I'd still recommend removing this since Ohanah is loading 1.10, which is newer.

From the lines around it, either jw_allvideos (unlikely) or com_dmk2maps (very likely) is what's including that file. Hopefully there's a setting to disable it.

Whew! Lots of info, but I hope that helps get you going. If you have any questions, just let me know.

Thanks,
Alex
Last edit: 9 years 11 months ago by alzander.
The topic has been locked.