Topic-icon Avatar and cover photo are not showing in jomsocial

Active Subscriptions:

None
Dear Team,

I've been looking solution till late to this issue that looks to be really common here.
I will listed the main points:

- avatar and cover photo are not showing in jomsocial
- profile fields as gender, birthday and about me are correctly imported
- in JFB user mapping all avatar are correctly imported
- when using the jomsocial Facebook connect before installing JFB connect, avatar worked fine
-Social Profiles - JomSocial profile plugin enabled
-- always import profile data: yes
-- import avatar: yes
-- import cover photo: yes
- in jomsocial > integrations > facebook settings: import avatar:yes
- I've seen in:
/images/cover/
/images/avatar/
---> there are no avatar and no photo of user logged via Facebook using JFBconnect
-I test JomSocial Edit Profile feature from frontend and it works perfectly
- I'm in localhost , jomsocial 4 and latest JFB
- I read all this post below but I don't' know which is the problem:
www.sourcecoast.com/forums/jfbconnect/jf.../4904-avatar-problem
www.sourcecoast.com/forums/jfbconnect/jf...o-jomsocial-profiles
www.sourcecoast.com/forums/jfbconnect/jf...with-facbook-avatars
www.sourcecoast.com/forums/jfbconnect/jf...-jomsocial-only-once
www.sourcecoast.com/forums/jfbconnect/jf...cial-google-function
www.sourcecoast.com/forums/jfbconnect/jf...nnect-users-in-js-26
www.sourcecoast.com/forums/jfbconnect/jf...-copied-to-jomsocial
www.sourcecoast.com/forums/jfbconnect/jf...8366-no-avatar-photo
www.sourcecoast.com/forums/jfbconnect/jf...-google-avatar-works

Best,
Baggio
The topic has been locked.
Support Specialist
8 years 4 months ago #55732 by alzander
There isn't an easy solution to this, or else we would have fixed it in the code already. JFBConnect is separate from JomSocial though, so what worked there doesn't necessarily mean much for what JFBConnect is doing. Also, what we show in the User Map area is separate from JomSocial, since not all sites use JomSocial. It's a good indicator that we were able to get the correct avatar URL from Facebook though.

With that said, please:
* Check the /tmp directory of your site. That's where JFBConnect copies the images from the social networks initially. You should see some files that start with either scprofile_ or sccover_. Those are the files we've downloaded.
* Check to make sure that those files are real avatar or cover images
* If so, set the "Enable Debug Mode" to 'Yes' in JFBConnect and try again. See if there are any error messages displayed when you register.
* If not, check the /logs/jfbconnect.log file to see if any error messages are shown.

Let us know how that goes and we'll gladly help. The issue downloading avatars usually resolves around the server not being able to connect and download from the URL provided from Facebook. It can be caused by various reasons though, and the above can help narrow it down.

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

None
Dear Alex,

I've seen in C:/xampp/htdocs/MYWEBSITE/tmp , but here I've only a folder of akeeba component, we have nothing related to what you said me to check.
I've checked also in server settings the path to tmp folder and it's correct.

Best,

Baggio
The topic has been locked.
Support Specialist
8 years 4 months ago #55745 by alzander
That helps narrow things down. It sounds like the downloading of the avatars is what's failing in the first place. We use cURL to download the file from the social networks. There's a few settings for cURL that could cause the avatar not to be downloaded. Things like following redirects, downloading files in general, using https to download content and more could be causing issues.

Another possibility is the Windows filesystem in general. We use the following command to store the saved file to the filesystem:
JFile::write($this->getAvatarPath() . '/' . $tmpImgName, $data);
The '/' is a standard way to separate file paths and should work under most WAMP configurations, but sometimes the '\' is required to not cause problems.

Did you try with the Debug Setting enabled? If so, were there any messages shown on the screen after trying to authenticate or login?

We'll gladly help you get things going on your local test system. I know, in another thread, you mentioned that you'd be trying to get Google+ setup on a real hosting server. This may be another thing worth testing in a real environment as well when you do, just in case.

Let me know how you'd like to proceed on diagnosing the XAMP site and we'll gladly help however we can.

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

None
Dear Alex,

I enabled the debug mode and tried to login with new test users and old users, but no messages shown on the screen.

Best,

Baggio
The topic has been locked.
Support Specialist
8 years 4 months ago #55757 by alzander
I'm assuming this is not on a hosted site that we can see/edit, correct? If not, the only suggestion I can give right now is to edit the following file:
/libraries/sourcecoast/plugins/socialprofile.php
Around line 525, you'll see the line I mentioned above:
JFile::write($this->getAvatarPath() . '/' . $tmpImgName, $data);
Try changing the / to \ to improve compatibility with Windows, like:
JFile::write($this->getAvatarPath() . '\' . $tmpImgName, $data);
Test is the files start to properly show in the /tmp directory.

If not, we'll need some way to access the server to investigate further. If you can put it live, somewhere, we'll gladly help get you going.

Thanks,
Alex
The topic has been locked.