Forum is closed

Pop-up doesn't close and redirect

Pop-up doesn't close and redirect

Hi, I've almost got this component and module working perfectly but I have one niggling issue which I hope you can help me resolve. On my site blah the facebook connect link opens fine, you log in, and the popup appears blank (has the connecter source code in it) and doesn't close or redirect the visitor to the specified page. What am I missing?

If you close the pop up and refresh the page and click the connect button again it logs you into your facebook account, but that's going to be a little hard to explain to visitors.

I appreciate any help of how I can fix this issue. Thank you for your help.

Clark
useravatar
Offline
22 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

My first, and only guess for now, would be to check your callback url.  It's obviously signing you into Facebook, but I noticed you have an automatic redirect set up to add "www." before your URL, but still posted it here without that.  Facebook is really picky, so make sure your callback is (in your case) "http://www.mightyfightinghawks.com"

If your callback is setup correctly, can you provide the following information about your setup?  You can find this in the administrator area under Help->System Information:
Joomla version
PHP version

Good looking page by the way.  I like the design, and it's always nice seeing JFBConnect in use.

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24065 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

Thank you for the follow up sourcecoast. The callback URL which is set in my facebook application is <!-- m --><a class="postlink" href="http://www.mightyfightinghawks.com">http://www.mightyfightinghawks.com</a><!-- m --> 

My details in the Help section show:

Database Version: 4.1.22-standard
Database Collation: utf8_general_ci
PHP Version: 5.2.5
Joomla! Version: Joomla! 1.5.9 Production/Stable [ Vatani ] 9-January-2009 23:00 GMT

I hope this helps you.

Thanks for the kind words about the site. I can't wait to integrate RC3 into Jomsocial and see how that goes. You're doing a great job so far.

Cheers.

Clark
useravatar
Offline
22 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

Clark,
Sorry to keep asking more questions, but what SEF utility are you using on the site?  The login URL being generated is strange, and could be the cause of the problem.  If you don't mind changing a line of code, I have a suggestion below.  I don't think this will fix the issue, but might get us farther along, and help to narrow down the problem.

In the components/com_jfbconnect/helpers/facebookhelper.php file, line 27:
function getFacebookUserLoginLink()
{
    return JRoute::_("index.php?option=com_jfbconnect&task=loginFacebookUser");
}

Change the return line to:
    return "index.php?option=com_jfbconnect&task=loginFacebookUser";

Depending on the SEF component, this may not change a thing (just ignoring JRoute), but it's an attempt.  Once I know what you're using, I'll try to install it and start trying to figure out the issue.  If there's a way inside the SEF component to ignore any URLs from JFBConnect, that'd be swell to too current/smile

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24065 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

Hi Sourcecoast, no problems with the questions, ask as many as you like.

I am using sh404SEF 1.0.16_Beta - build_222  but I noticed that it was set to nocache and not skip for JFB connect so I have just changed that and cleared my cache. It will rebuild the URL's over the next 15 minutes or so.

I modified the code in the helper, so lets see if that helps. I'll try again soon and post up my results!

Thanks again for the help.

Cheers

Clark
useravatar
Offline
22 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

I've just tried it again, the pop-up window now closes after authentication but unfortunately I am now getting a redirect loop error post log-in. Is this something I have perhaps misconfigured in my settings?

Should I change the helper file back to normal?

Clark
useravatar
Offline
22 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

Yeah, I'd change it back.  A white screen is better than an infinite redirect.

Again, didn't think this would fix it, but it did exactly what I was hoping for... narrowed down your cause to a routing/SEF problem.  We'll work on figuring out how to make sh404SEF play friendly with JFBConnect.

Thanks again for your feedback and prompt responses.  It sucks that you're running into these issues, but we'll get to the bottom of it.

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24065 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

Thanks Sourcecoast. I've just changed it back and I get a 500 error while trying to reach:

<!-- m --><a class="postlink" href="http://www.mightyfightinghawks.com">http://www.mightyfightinghawks.com</a><!-- m --> /index.php?option=com_jfbconnect&task=loginFacebookUser &return= aW5kZXgucGhwP29wdGlvbj1jb21fY29tbXVuaXR5JnZpZXc9ZnJvbnRwYWdl.

**The spaces in the URL are added here to stop it auto shortening in thepost **

I know this is going to be part of the same problem with the SEF, I just wanted to make you aware of it in case I decide to revert back to my old login module. This is with setting the JFB component to Skip in sh404SEF.

Thanks again for your help.

Clark
useravatar
Offline
22 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

I am also having this same issue.  Is there any update on a resolution?

Thanks in advance.

dan_jericho
useravatar
Offline
11 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

We are actively looking into this.

I'm assuming you're using SH404 as well?  Just trying to get as much info as possible so we know if other components may also be causing the issue.

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24065 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

Yep,

Im using sh404sef.

dan_jericho
useravatar
Offline
11 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

Alright, we think we have a solution for the SH404 issues that we've had, but would like to have any of you affected make minor changes to 2 files to test first.  If you can't, that's fine, we'll post RC4 with these fixes early this week, but would like to have some wider testing first.  Also, if you notice other problems that may be related, post them here.

Cause: Joomla router is converting '&' symbols in the URL to '&' which then is getting sent to Facebook and back again, and SH404 isn't routing these back to the JFBConnect component correctly.

Solution:
In the SH404 configuration, under the "By Component" tab, switch the first column for JFBConnect from "(use default handler)" to "Skip".

Modify the following 2 files:
/components/com_jfbconnect/helpers/facebookhelper.php  (~line 26, remove JRoute::_() function call):
    function getFacebookUserLoginLink()
    {
        #return JRoute::_("index.php?option=com_jfbconnect&task=loginFacebookUser");
        return "index.php?option=com_jfbconnect&task=loginFacebookUser";
    }

/modules/mod_jfbclogin/tmpl/default.php (Add JRoute::_( xxx, false) to 2 function calls)
line 13
    Change: var fbUserLoginLink = "<?php print JFBConnectFacebookHelper::getFacebookUserLoginLink(); ?>&return=<?php echo $fbLoginUrl; ?>";
    To: var fbUserLoginLink = "<?php echo JRoute::_(JFBConnectFacebookHelper::getFacebookUserLoginLink()."&return=".$fbLoginUrl, false); ?>";

line 30
    Change: window.location = 'index.php?option=com_jfbconnect&task=logout&return=<?php echo $logoutUrl; ?>';
    To: window.location = '<?php echo JRoute::_('index.php?option=com_jfbconnect&task=logout&return='.$logoutUrl, false); ?>';

Thank you for your patience.  Any custom modifications to the login template should not be affected (though the line numbers above may obviously be different).  Please post results!

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24065 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

Hi,

Thanks for the fast response.  I'll give this a whirl and let you know if it solves the problem.

Thanks again.

dan_jericho
useravatar
Offline
11 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

Just to follow up, that seems to work ok now, but I will test it further.

dan_jericho
useravatar
Offline
11 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

Works perfectly for me as well! Thanks for the timely fix Sourcecoast.

Clark
useravatar
Offline
22 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

Hi,

Ive tested the change and for the most part everything works.  But another problem has come up.

When I login thru joomla with an account that is already connected via facebook Im still getting the "Connect this account to facebook" button.  When i click it a pop up appears and then I get a "Page cannont be found" within the pop up.  Should the "Connect this account to facebook" button not be hidden if the user is already logged in to an account that had been attached to facebook?  I am using an account that was created previous to the jfbconnect installation.

Try it on my site urfestival.com

Thanks

dan_jericho
useravatar
Offline
11 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

Also getting a problem with the activation link when a user tries to create a joomla account which give an error about he facebook component.

If you sign up for an account on my site as a regular joomla user you'll see what i mean.

Thanks

dan_jericho
useravatar
Offline
11 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

Maybe you've posted it before, but whats your site?  I just tried this on our test site (Joomla activation enabled, create new Joomla user, not using JomSocial..) and didn't see any issues.

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24065 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

my site is urfestival.com
Im using jomsocial as well

dan_jericho
useravatar
Offline
11 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

I just tried to create an account on your site, filled out the profile, did not upload a phot, and received the activation link correctly.  Clicking it led me to:
<!-- m --><a class="postlink" href="http://urfestival.com/Activate-account.html?activation=72d4a6817a62866d1d09c12513075f57">http://urfestival.com/Activate-account. ... 2513075f57</a><!-- m -->
Which states:

Activation Complete!
Your Account has been successfully activated. You can now log in using the username and password you chose during the registration.

What are you seeing?

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24065 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

Hi,

There no problem creating the account.

But when you login with this account click "Connect this account to facebook" it will connect to facebook.

Now logout

Login again (not using facebook connect) and the facebook connect button still appears, even tho the account has already been connected to a facebook account

dan_jericho
useravatar
Offline
11 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

Get the following error message when i left the computer for a few hours after logging in via facebook.

Might be an issue with session timing out.

Warning: Missing argument 1 for JFBConnectFacebookHelper::_getUserInfo(), called in /home/urfest/public_html/plugins/authentication/jfbconnectauth.php on line 48 and defined in /home/urfest/public_html/components/com_jfbconnect/helpers/facebookhelper.php on line 174

Fatal error: Uncaught exception 'FacebookRestClientException' with message 'Session key invalid or no longer valid' in /home/urfest/public_html/administrator/components/com_jfbconnect/assets/facebook-api/facebookapi_php5_restlib.php:2458 Stack trace: #0 /home/urfest/public_html/administrator/components/com_jfbconnect/assets/facebook-api/facebookapi_php5_restlib.php(1232): FacebookRestClient->call_method('facebook.users....', Array) #1 /home/urfest/public_html/components/com_jfbconnect/helpers/facebookhelper.php(179): FacebookRestClient->users_getInfo(NULL, Array) #2 /home/urfest/public_html/plugins/authentication/jfbconnectauth.php(48): JFBConnectFacebookHelper->_getUserInfo() #3 /home/urfest/public_html/libraries/joomla/user/authentication.php(121): plgAuthenticationJFBConnectAuth->onAuthenticate(Array, Array, Object(JAuthenticationResponse)) #4 /home/urfest/public_html/libraries/joomla/application/application.php(528): JAuthentication->authenticate(Array, Array) #5 /home/urfest/public_html/includes/application.php(187): in /home/urfest/public_html/administrator/components/com_jfbconnect/assets/facebook-api/facebookapi_php5_restlib.php on line 2458

dan_jericho
useravatar
Offline
11 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Pop-up doesn't close and redirect

This issue was fixed in the 2.0 release published yesterday.  It should be resolved now (the Warning line at the top is a guaranteed sign that you're using an older RC version).... certainly if somehow that's still showing up, let us know.  Your Authentication Plugin should be version 2.0.2 (that's the 2.0 release version)

As for your other post about logging in on the Joomla side and still seeing a "Connect this account", this is the 2nd time we've seen this and started us thinking... so we made the post linked below for suggestions on why it's like it is, and soliciting feedback on how our users think we should 'fix' it.  It's lengthy.. sorry  current/lol
<!-- m --><a class="postlink" href="http://www.cmsmarket.com/forum/index.php?f=38&t=76&rb_v=viewtopic">http://www.cmsmarket.com/forum/index.ph ... =viewtopic</a><!-- m -->

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24065 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests also viewing this topic
There are 0 users also viewing this topic

Board Info

Board Stats
 
Total Topics:
11641
Total Polls:
0
Total Posts:
48907
Posts today:
13
User Info
 
Total Users:
47750
Newest User:
catalinioan
Members Online:
1
Guests Online:
644

Online: 
theresa4sixsuit
Social Stream
SourceCoast Joomla Social Extensions
Friday, 25 May 2018
JFBConnect 8.0 Coming Soon! Stay tuned.
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program