By Dreamonde Limited / Alfred Tang on Thursday, 17 April 2014
Posted in Technical Issues
Replies 5
Likes 0
Views 0.9K
Votes 0
Hi Team,

Sorry I found another bug/ problem again.

This time with the JFBConnect. I guess this should be some problem between the integration of JFBConnect with ES; please let me know if I should report the problem to the developer of JFBConnect. Let me explain the situation.

JFBConnect Settings
- Enable quick registration via Facebook
- Enable profile import, with Avatar and Cover photo

1) Login and register directly via JFBConnect Facebook connect, with a Facebook account
2) Once it is done, 2 albums (Cover photos & Avatar photos) will be automatically created
3) The account owner can upload any photos into this two albums, by uploading / editing their cover and avatar
... however
4) The account owner is unable to DELETE (guess also for modify) any photos within this "auto created" albums because, the owner of the album is = "A guest" or COM_EASYSOCIAL_GUEST_NAME .

Initially I guess it's JS or JQuery conflict since I got error message from the Chrome' inspector console; Tried with Safari, same problem. Then I tried to login with another locally registered account (no facebook link), I can delete my own photos. After checking from the backend, I guess this is due to permission issue: The album author (owner) is not the account owner him/herself.

Please see the attached PICs FYI. Please let me know if I should submit this issue to JFBConnect. I can only disable this function at the moment. (Auto avatar / cover sync)

Thanks.

Best regards,
Alfred / Dreamonde
Hi team,

I just received an reply from JFBConnect developer (confirm their bug), will test with their suggestion (code modification) and share with all here very soon. Thanks.

Best regards,
Alfred/ Dreamonde
·
Thursday, 17 April 2014 11:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Alfred,

I am sorry for the delay of this reply.

Regarding your issue, can you pass me your Joomla backend admin access and your ftp account so that I can investigate this issue further?
Also, will it be okay if I re-enable the auto avatar/cover sync so that I can debug this issue directly from your site?

Please advise.
Sam
·
Thursday, 17 April 2014 11:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Sam, I just got reply from JFBConnect team, will share with you the result soon. Cheer~
·
Thursday, 17 April 2014 11:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Team,

I've tested the suggest code modification and confirm it's work flawlessly! If you are also using JFBConnect 6.0.4 you may apply the patch to the file (or replace the file attached);

Please replace the file at: /plugins/socialprofiles/easysocial/easysocial.php

This is the original link for the post just in case:
https://www.sourcecoast.com/forums/jfbconnect/jfbconnect-joomla-3x-support/8452-problem-with-imported-avatar-cover-albums-with-easysocial#p43215

[QUOTE]

We're looking into this. For the cover photo, the following change looks like it should get you going (though please test). Please edit the /plugins/socialprofiles/easysocial/easysocial.php file. Around line 618, you'll see:
Code:
// Create the default album for this cover.
$model = Foundry::model('Albums');
$album = $model->getDefaultAlbum($user->id, SOCIAL_TYPE_USER, SOCIAL_ALBUM_PROFILE_COVERS);
Add the following 2 lines after that:
Code:
$album->user_id = $this->joomlaId;
$album->store();
One other thing to be aware of is that there is a bug in 1.2.7 of EasySocial which can prevent covers from uploading. If you're affected, please see this post with a fix.

For the avatar, in the same file, around line 745, you'll see:
Code:
protected function setAvatar($socialAvatar)
{
Right after that, add the following:
Code:
$model = Foundry::model('Albums');
$album = $model->getDefaultAlbum($this->joomlaId, SOCIAL_TYPE_USER, SOCIAL_ALBUM_PROFILE_PHOTOS);
$album->user_id = $this->joomlaId;
$album->store();
Both of those code changes will ensure that the default cover photos are created properly as EasySocial makes some assumptions that don't work with JFBConnect.

Please keep me posted if that gets things going for you. We'll put out a new release soon with these updates, but would love your feedback first.

·
Thursday, 17 April 2014 11:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Alfred,

Thanks for sharing the fix
Sam
·
Thursday, 17 April 2014 17:04
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post