Topic-icon Problem with Looping login using JFBConnect

Active Subscriptions:

None
12 years 11 months ago #34143 by y021ahe
Hi
I regret I have not received an update to my last post - Do you have any thoughts or are you still investigating?

Thanks

Rich
The topic has been locked.
Support Specialist
12 years 11 months ago #34152 by alzander
Rich,
I'm very sorry for the delay in getting back to this and thank you for bumping it. I somehow glazed over your original request and sincerely apologize for not responding sooner.

To test, all I did was:
* Click Login with Facebook
* Fill out my profile on the registration page
* I was automatically logged in
* Went to the page you mentioned
The site immediately tried to re-log me in. I also see the issue on the "Race-Reviews" page, and likely others.

The issue does seem to be from the Include Component plugin. We've never used that plugin. I've honestly never heard of it, but that doesn't mean anything 'bad'. From the description, you use a tag like {component ..}. If you remove that tag from the page, does the auto-login issue stop?

The reason that I'm leaning toward that plugin is because it's causing our JFBCSystem plugin to be triggered twice on the page, and so if you look at the HTML, you'll see 2 inclusions of the all.js file. The second is directly under the note about using the Include Component plugin where it puts the following comment in the code:

<!-- Plugin Include component version 1.13 by Mike Reumer


Since the Include Component plugin is calling our code twice, it's likely bypassing our checks that are meant to prevent a duplicate login. Each initialization of our code will 'detect' the user is logged in and see if they should be automatically logged in. Since that is happening twice, the second time is likely skipping some of our checks because JFBConnect isn't prepared for 2 authentication attempts (or it's even thinking the user is intentionally trying to log in again).

We can investigate the Include Component further, but I don't think I'll have an immediate answer for you at all. I'd love to hear if disabling the tag on the pages that break works for you. Until then, the only recommendation I'd have is to disable the Automatically Login Facebook Users setting in JFBConnect as that should prevent the problem altogether.

Again, sorry, but I hope this helps narrow things down for you.

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

None
12 years 11 months ago - 12 years 11 months ago #34179 by y021ahe
Alex,
Thankyou for responding to me.

I believe as you say that the issue is definitely with the interaction between the Plugin Include Component and your component. I removed the tag "{component url='index.php?option=com_phocadownload&view=file&id=5&template=atomic'}" from the first Article in the Race Reviews page and as you can see the issue stops on that page - I have left it in the Race Calendar and Championship Table to aid diagnostics for yourself.

I can also believe that the issue relates with the all.js script as you suggested - The Plugin Include component allows you to Ignore Scripts - in the documentation this advises -

"Add here the scripts that has to be ignored. Enter each relative url on a new line.

Add the standard javascripts loaded by the template in the ignore fields of the plugin.
This should be the same url as in the generated source of the page or the file index.php in the template directory.
Every url on a new line.

So for example:
/templates/rt_replicant2_j15/js/rokmoomenu.js
/templates/rt_replicant2_j15/js/rokfonts.js"

So, When I added all.js in this section I believe the problem did not occur. Weirdly though I didnt put the full URL, I just put all.js as I couldnt find the file in my filesystem - changing the the plugin to remove it and then saving the plugin and reloading the page doesnt make it work/not work - the whole browser seems to be closed and reloaded for that to happen - would that be your expectation - is this file somehow loaded at browser, not window level - I dont know enough about that?

I have since removed this ignore all.js from the plugin paramters, to aid your recreates - it now "doesnt work" as before.

So in short - It is definitely related to the Plugin Include Component and can be worked around by setting the all.js to be ignored - I don't know what this does but assume it shouldnt be ignored so feel that could only be a workaround.

I have made no changes to the parameters in JFBConnect.

Thanks

Rich
Last edit: 12 years 11 months ago by y021ahe.
The topic has been locked.
Support Specialist
12 years 11 months ago #34184 by alzander
That sounds like the right process, to ignore that script. There's other code that we'd still be inserting, but as long as that file isn't double-loading, I don't think the other stuff should be an issue.

Can you ignore the all.js file again and let us know when we can test. We've already tested with it not-ignored and know that it's not working. When you get it back into a 'working' state, we'll gladly check to see if there's anything else we can see that may be a problem.

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

None
12 years 11 months ago #34195 by y021ahe
Hi Alex,
I have added the ignore for all.js into the plugin as can be seen in the attached screen shot.


File Attachment:



Rich
The topic has been locked.
Support Specialist
12 years 11 months ago #34209 by alzander
Rich,
On the Championship Tables page, I'm not seeing the multiple reloads anymore, but I'm still seeing many inclusions of the all.js file. It looks like you're including 3 different components, which is re-including the all.js and our initialization code 3 extra times.

So, while it seems like it's working on that page, it doesn't seem to be ignoring that file like you configured. Our initialization code may still cause problems even if you ignore just that file, but it's the best first step.

Either way, let us know if the problem is still happening for you because, like I said, it's not looping for me.. which is a good thing.

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

None
12 years 11 months ago #34226 by y021ahe
Hi - adding the all.js did not work as you have suggested - I still get the same looping problem on the Championship Tables page. I've changed the setting to Ignore All scripts and that does work - I have left it like that for you to review.

I couldn't find an entry called all.js in my cpanel - is that what you expect?

Are you able to code around this type of scenario?

Rich
The topic has been locked.
Support Specialist
12 years 11 months ago #34228 by alzander
Rich,
The all.js file is loaded from facebook.com and is not stored on your site, so you won't be able to find it locally.

I just tested on your page and the code is properly removed and only there once. Things look right to me and if it's working for you, then I'd recommend you keep the settings as you have them.

As for us coding around this, that's not something we'd be doing anytime soon. You seem to have a solution with the settings you've created. Additionally, the include component extension makes Joomla do something it really wasn't meant to do. It may be possible to work around it's functionality, but it would be a very low priority for us since it's not ordinary and, in 5 years, this is the first time we've heard of this conflict.

I'm glad you have something that works for you, but if you run into further issues, let us know. We can gladly take a look and explain what may be going wrong again if necessary.

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

None
12 years 11 months ago #34252 by y021ahe
Alex,
As you say I am glad that we have a solution that works

I was obviously concerned that this may have an impact on the JFBConnect extension, but providing you can confirm that there will be no effect on your component, then I will leave all scripts excluded and we will continue in that manner.

Thanks for your help

Rich
The topic has been locked.
Support Specialist
12 years 10 months ago #34414 by alzander
Rich,
I realize I never responded to this post, and I apologize for that. The changes you made above shouldn't adversely affect JFBConnect at all. If everything is working for you as expected with those changes, then you should be good to go.

Again, sorry for the delay. If you do run into issues though or need something else, just let us know.

Thanks,
Alex
The topic has been locked.