Topic-icon Twitter login returns blank page

Active Subscriptions:

None
10 years 1 month ago - 10 years 1 month ago #57869 by Charmaine
Hi,

I have a problem logging in via Twitter. The login returns blank page. I've made a search on this forum to find a solution, found a similar problem but the solution wasn't found.
After logging in the page is blank, the following is in the browser address bar:
https://my-site/component/jfbconnect/?view=loginregister&provider=twitter&return=aHR0cHM6Ly9zbm93Zmxha2VkZXNpZ25zLmNvLnVrLw==
when I change global configuration Error Reporting to Maximum, the error is:
Fatal error: Class 'ShopFunctions' not found in /.../.../.../.../plugins/socialprofiles/virtuemart2/virtuemart2.php on line 177
SCLogin Module settings:
Registration Component - Joomla
Joomla Login Redirection URL - same page

I'm using the latest JFBConnect version, Joomla 3.4.8, VirtueMart is the latest version as well. I have activated Virtuemart 2 in Profiles to be able to map users'data, because there was no VirtueMart 3 plugin in my download pack.

I have carefully checked the Twitter app setting, the key etc. No mistake there. After Autotune Error Check I get the message:
"Error: Uh oh! We could not fetch page due to an unknown error."

Update: Yesterday the login via Twitter didn't work on laptops nor on smartphones. I thought I'd made a mistake creating app, so deleted it and created a new one. Now the new one works on smartphones, but not on desktop/laptop website versions. Please help!
Last edit: 10 years 1 month ago by Charmaine.
The topic has been locked.
Support Specialist
10 years 1 month ago #57873 by alzander
The issue definitely looks to be a new change in VM3. While our plugin was developed for VM2, it has been tested with earlier versions of VM3 without issue.

Doing a *very* quick look at the code, I think the problem should be easily solvable if you're up for testing a small code change. If so, edit the /plugins/socialprofiles/virtuemart2/virtuemart2.php file. Around line 158, you'll see:
private function getFieldFormData($fieldValue, $_field)
    {
Add the following line directly after that:
if(!class_exists('shopFunctionsF'))require_once(VMPATH_SITE.DS.'helpers'.DS.'shopfunctionsf.php');
Then, a few lines below, you'll see the following 2 lines:
$_field['formcode'] = shopFunctions::renderStateList($fieldValue, '', false);
            $_field['formcode'] = ShopFunctions::renderCountryList($fieldValue, false, array(), '');
Update both of those calls to change ShopFunctions to ShopFunctionsF, like:
$_field['formcode'] = shopFunctionsF::renderStateList($fieldValue, '', false);
            $_field['formcode'] = ShopFunctionsF::renderCountryList($fieldValue, false, array(), '');
Let us know how that goes. We'll do some testing as well with the newest release of VM3, but that could take some days. Hopefully the above helps get you going now.

If not, the solution to get social authentication working would be to disable the Social Profiles - VM2 plugin for now.

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

None
10 years 1 month ago #57885 by Charmaine
Hi Alex,
Thanks for your response.
I've just tried to implement the solution that you suggested. The reason I didn't do it earlier is that the problem was coming and going, so sometimes twitter was working fine, sometime Facebook was returning blank page.
After editing the code following your instructions, Facebook worked well but VirtueMart section of user registration will need further editing. I've got those fields (in the area of shopper info section):
COM_VIRTUEMART_USER_FORM_BILLTO_LBL
COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_LBL

Country *
COM_VIRTUEMART_LIST_EMPTY_OPTION
State / Province / Region *
COM_VIRTUEMART_LIST_EMPTY_OPTION

I'll disable this plugin as of now and looking forward to receiving the update:-)
The topic has been locked.
Support Specialist
10 years 1 month ago #57894 by alzander
If you're seeing those capital letter strings, it means a language file isn't loading properly. In our social profile plugin, we're loading the following language files:
com_virtuemart
com_virtuemart_shoppers

Can you check your language files directory and determine where those strings, like COM_VIRTUEMART_LIST_EMPTY_OPTION, are defined? If they are in a different file, let us know and we can help you add the command to load the additional language files.

Thanks,
Alex
The topic has been locked.