Topic-icon How to turn off registration without deleting config.

Active Subscriptions:

None
10 years 5 months ago #43038 by ebjobb
Hi, sent the credentials in private. Looking forward to your test :)

Oddgeir
The topic has been locked.
Support Specialist
10 years 5 months ago #43050 by alzander
Thanks for the credentials. We are seeing the same error when we login with your account. The reason you are having the issue is because you have a Channel setup for Twitter using that user. The resetConnection call is a function of JFBConnect that should work, and it's used whenever additional permissions are requested of a user.. which is the case to get the 'write' permission for your Twitter profile.

The reason it's not working is because (I think) some other extension is using a similar OAuth library (for authentication) that's conflicting with ours. If you're up for 2 small code changes, they should get you going. Please make these through the command line or FTP and not OSE Fileman. If you edit one file at a time through the Joomla admin area, you may break the site since both need to be modified at the same time.

Edit 1: /components/com_jfbconnect/libraries/provider/twitter/oauth1.php
At line 12 is:
JLoader::register('JOAuth1Client', JPATH_SITE . '/components/com_jfbconnect/libraries/joomla/oauth1/client.php');
Change that to:
JLoader::register('JFBCOAuth1Client', JPATH_SITE . '/components/com_jfbconnect/libraries/joomla/oauth1/client.php');
At line 22 is:
class JFBConnectProviderTwitterOauth1 extends JOAuth1Client
Change that to:
class JFBConnectProviderTwitterOauth1 extends JFBCOAuth1Client

Edit 2: /components/com_jfbconnect/libraries/joomla/oauth1/client.php
At line 20 is:
abstract class JOAuth1Client
Change that to:
abstract class JFBCOAuth1Client

Please let me know how that works. If you run into other errors, or that makes other pages go white, please revert them and we'll try again. Hopefully that will get you going though. The good news is that this isn't affecting all users.. just the one account you setup for the Channel.

Thanks,
Alex
The topic has been locked.
Support Specialist
10 years 5 months ago #43051 by alzander
Oh, in case it's not clear, in all the edits above, you're changing JOAuth1Client to JFBCOAuth1Client
The topic has been locked.
Active Subscriptions:

None
10 years 5 months ago #43054 by ebjobb
Hi Alex, thank you so much, I did the changes and I am able to login now BUT I get the "Authorize Wj login to use your account?" screencast.com/t/7jus5DFTbbZJ 2 times, meaning I have to click the blue "Authorize App" button twice to enter site. Any advice on that?

Thanks again,

Oddgeir
The topic has been locked.
Support Specialist
10 years 5 months ago #43059 by alzander
Glad to hear that change worked. The double-authentication for Twitter is correct. That's necessary when you have a Channel setup.

The first authentication is required to get the standard "Read" permission. This prompt is what everyone will see.
The second authentication prompt is required to get the "Write" permission, necessary to push content to that Channel.

JFBConnect can only know what user is logging in (and hence check to see if that user requires the additional write permission) after they've authenticated the time.. so when you have a Channel configured for a user, there's two authentication prompts when using Twitter.

I hope that helps explain,
Alex
The topic has been locked.