× Joomla Facebook Connect support forum

Topic-icon What happens when existing fields and imported FB fields conflict?

Active Subscriptions:

None
I can't figure out whether some of this functionality is intentional or an error, so I had a few questions because i can't figure out if things are working correctly:

1. If a user has an existing account (using the FB only option, not full profiles) in JomSocial and fills out their information so it's stored in the system, and later syncs his FB profile to that account (with profile import turned on), will the new FB info over-write the existing info? What if a field has existing info and FB's field is blank, will the existing filled out field be over-written with blank data (this seems to be happening) or will existing data stay put?

e.g. If the user has an entry in the field "City" but that field is blank in their FB profile - will "blank" overwrite the city name. And what happens if there is a "City" in there and FB has another entry? will the FB overwrite the system?

2. Is there any way to make the FB field import optional if field conflicts are encountered - i.e. could a user choose whether to overwrite fields or not, or alternately choose which fields to import? Is there any way to enable conditional import - for example to set a condition that if there is NO data in FB but there IS data in JomSocial, do not overwrite, etc?

3. When setting FB profile import. Is there any way to set automatic updating of certain fields on every login, but not every field? e.g. Import all fields at the beginning, but then only sync the "Location" field on every login

4. When you initially create an account using FB (using the only-FB option, not full profiles), is there any way to forward the user to the Registration Page of JomSocial instead of the standard Edit Profile page? (the difference being that only select fields are set for Registration, whereas a lot more are possible to set in the profile setup).

Thank you.
The topic has been locked.
Support Specialist
Joe,
I'll try to answer all your questions here, but if I miss something, or you have others, just let us know.

1) If you have the 'always import profile' setting enabled, the profile will always be imported and overwrite any fields you have setup to be 'mapped'.

I just looked at our code, and it does look like even blank values will override existing ones.. which we agree, is probably not the right thing to do. I've added an issue to our tracker to change this behavior, but if it's urgent for you, we can probably provide a fix that should stop this behavior so that if the fields is blank, the value won't import. However, if there's a value in Facebook, it would still overwrite whatever is in their Joomla profile.

2) There's no conditional import abilities for the user to select, and we don't plan on doing this. It'd be very complex, and would be very dependent on each of the different profile systems we integrate with. The only option we have is for the admin to decide if it's a one-time import (during registration) or every-login import.

3) No, we don't have this ability. This would add a lot of extra settings to configure, and frankly (after 3 years) is the first time we've had the request, so it simply wouldn't be a high priority for us.

4) You can configure the New User Redirection to go to whatever page you want, but it must be a menu item. We'd recommend you create a menu item for JomSocial -> Profile -> Edit Profile and use that as the new user redirection. You don't have to show this menu item anywhere, but just need it created for JFBConnect to see it.

Hope that helps answer your questions, but if you have more, just let us know!
Alex
The topic has been locked.
Active Subscriptions:

None
Thank you very much for the speedy response.

1- It would be great to get a fix for the blank field over-write issue, otherwise it defeats much of the usefulness of pre-creating profiles for users.
2-If there is a fix for #1, then this is no problem
3-Ok, thanks
4-
So, there has been no problem in forwarding users to JomSocial -> Profile -> Edit Profile , but one of the main functions of JomSocial is that it allows you to specify which fields are going to be "registration" fields - so as to simplify initial profile setup. But when implementing JFBconnect, that functionality seems to stop working.

To clarify, when a user creates their initial profile in JomSocial, they see a registration screen with only those fields specified as Registration fields, but when you go to Edit Profile, you see everything. So is there any way to just go to the default JomSocial registration process (that screen is not something that can be linked to in the menu as far as I know, but maybe you know better.)

Thank you
The topic has been locked.
Active Subscriptions:

None
Any update? Thanks!
The topic has been locked.
Support Specialist
Joe,
Sorry for the delay in getting back to this. We have what we think should be a fix to overwriting filled fields with blank data, but haven't tested it yet. If you'd like to try the following change, it should do what you're looking for.

In the /components/com_jfbconnect/libraries/profile.php file, at line 306, you'll see:
$sql .= $this->addFieldToDB($fieldId, $value);
Update that to:
if ($value != "")
   $sql .= $this->addFieldToDB($fieldId, $value);

I see what you're saying about the different types of fields. Right now, we simply show the required fields (if configured that way), but don't even look at what's marked as a registration field. The main reason for this is because we do the field mapping during registration, which means that many registration fields could be filled in automatically.. so we just care about 'required' fields to make an admins life easier. It's a distinction, and difference, from JomSocial, but is meant to keep registration forms to a minimum.. which has always been a primary goal of JFBConnect.

If you can't get a good combination of required vs registration fields going during the initial registration process, let us know, and we'll see if there's an easy change we can make to either 1) show the 'registration' fields instead of 'required' fields or 2) redirect to the profile page you're looking for. If you have a preference between the two, let us know that as well.

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

None
Thanks for the great response. (I am very impressed at how well you guys support this, kudos!)

I will play with the code addition and let you know how it goes.

If you can't get a good combination of required vs registration fields going during the initial registration process, let us know, and we'll see if there's an easy change we can make to either 1) show the 'registration' fields instead of 'required' fields or 2) redirect to the profile page you're looking for. If you have a preference between the two, let us know that as well.


The JomSocial convention is to separate "required and registration" fields into separate options, and it is a good idea because you can add optional fields in the registration (e.g. we'd like you to fill this out, but don't require it, because you may not have it). So a required field is almost always in registration, but a registration field is not necessarily required.

When plugging in to JomSocial it is a good idea to follow their convention, and if JFBC could show "registration" fields that would be excellent. However, if it's not something you guys prefer to change in JFBC, I would rather have a redirect (if possible) to avoid hacking the core code (Jomsocial does not seem to have the option to link to the Registered fields signup page from the menu).

Thanks again!
The topic has been locked.
Support Specialist
Joe,
No problem for the support. It's what we do, and why we charge for a subscription. We realize Facebook integration is always a moving target for development, and has special requirements for each user's site.. and therefore, needs a high level of support. Without it, JFBConnect just isn't a great extension (though we try to make it so you never need support...)

Definitely understand the JomSocial convention, and realize we don't adhere to it completely. The reason we only show required fields during the "Full Joomla User" process is simply because the admin has deemed them 'required' (i.e. minimal amount of fields that need to be filled in).. and one of the benefits of JFBConnect is a 'quick' registration process.. which is why we focused on those only. It's definitely a disconnect as you may want more fields during registration, even if you don't need the info, but admins that use JFBConnect generally are trying to use it to minimize the registration flow. While that should mean similar requirements for Required and Registration fields, that's not always the case (we think it should be, frankly).

With all that said (yes, I like to talk), if you're using the "Facebook User Only" setting of JFBConnect, really none of the above applies, since only what you map is what gets imported. As for the registration page from JomSocial, there's no way to redirect to that page. The user information isn't stored permanently at that point, only in a temporary state while more and more information is added to their profile. Once the registration profile page is complete, JomSocial actually stores all that info in the database. It'd be really difficult (and JomSocial version dependent) for us to implement support for using their view to do that.

We could easily help you to change the "Full Joomla User" registration flow to show all registration fields though, in case you'd like to do that.

So.. hope that makes sense, and explains where we're coming from, even if it's not exactly what you're looking for. Outside of sending the user to that registration form page, if there are other recommendations you have, we'd love to hear them. Most of the features in JFBConnect came from users at one point or another. :)

Thanks for all your feedback.. great to hear how user's are using things!
Alex
The topic has been locked.
Active Subscriptions:

None
Thanks for the great response, in particular the thing about the "temporary state" which I did not know about. I think I may have to rethink our login process once again to use full profiles, though I was hoping to avoid it :-/.

1. Could you please tell me the fix to redirect to Registration Fields - that would be required regardless.

2. An unrelated question that may have an impact - do you know of any way to hack the Edit User Profile page in JomSocial into multiple tabs or a wizard type of option? That may hold a potential fix to the situation.


Thanks again!

-Joe

Here's a bit of a longer response to the Required vs Registered fields on my end too, if that helps (I am feeling verbose today). Of course you're in a better position to judge about how you want the functionality to work in JFBC, but here is my reasoning for making the switch to point to Registration Fields vs Required Fields:

A. It makes it compatible with JomSocial and removes a level of confusion/complexity from the site-launch process
JFBC can be a bit daunting when you set it up, and the user registration paths are tricky to figure out when you first install it (though I completely agree that what it ends up doing is very effective). Redirecting to something non-standard is confusing and requires the users to rethink their existing Jomsocial registration process to conform specifically to JFBC (it did for me). It enforces an additional level of complexity for a small issue, where it shouldn't be needed, and adds confusion into the login process.

B. It may be faster, but it should be up to the user
It should be up to the user to decide which fields should work (which is why that functionality is in JomSocial). If the user wants to have fewer fields, there's no reason why they can't select fewer for registration.

C. JomSocial is customized all the time, this may break a lot of custom sites
In addition to the above consideration, JomSocial is really customized for many different types of sites with many purposes that the designers did not specifically envision, and there can be lots of different use cases that are based on default JomSocial functionality, but wouldn't work by eliminating it.

For example, one of the things we were considering is another way to use the required fields, a little known use case, where after user registration and basic field entry, you would redirect users to a full edit-profile page where they would be *required* to fill out additional fields. Fields that they did not need to fill out when they registered initially. This particular one is not a common use-case, but the point is that it's possible with JomSocial, but impossible when you integrate JFBC. And there could be many other unique systems of the same vein.

Anyway, that's a long response, you're obviously in a better position to judge, but I would say that there is no need to change default functionality if not needed.
The topic has been locked.
Support Specialist
Joe,
The temporary state of profiles during registration is something I don't think a lot of people know about, and not something we really like about JomSocial. The main problem is that the user doesn't get created if the user leaves after filling out their username/email/password but before submitting the 'registration' form fields. You can test this on your own, but the username/email stuff is something you don't want to lose, even if the user gets scared away by a big reg form. Last time we test was on 2.0, but I think that's the same case in 2.2 as well.

With that said, here's the answer to the other questions:
1) There isn't a way to redirect to the registration form that JomSocial uses while using JFBConnect. They expect some temporary data to be handed to that form, which we don't generate. We can help you to add the registration fields to the JFBConnect registration page, if you plan to use the "Full Joomla User" setting, but with the "Facebook user Only" setting, the only option we can provide is redirecting to the full Edit Profile page of JomSocial.

2) I don't know of any way to separate out the fields in the Edit Profile page of JomSocial. I'd ask in their forums, as they know their code better.. or any add-ons that may do what you're looking for.

For the comments:
a) We agree that JFBConnect can change the flow of JomSocial a bit, but it's something we've heard only positive feedback about in the past. Additionally, since we have the ability to import fields from Facebook, if we were to redirect to the normal 'registration' page of JomSocial, it's possible only one field would be there (or none) since that info may already be pulled in. This could add a different type of confusion for admins and still require re-thinking things.. that's why we have the option to show the fields on 'our' registration page, if you choose to do so.

b) We pretty much do this, just in a different way. Again, I can easily help you to show just registration fields on our login/register form, or required and registration, or just required (what we do now). The only way we can't do that is through the "Facebook Only" flow, which is strictly meant for very quick registration. If you want a longer flow, and more info from the user, "Full Joomla User" is the only option from JFBConnect.

c) That should be still easily be possible with JFBConnect. The new user redirection can let you redirect the user wherever you want. If you have the ability to force user's to fill out fields on this 'new user' page, JFBConnect shouldn't interfere with that at all.

Hope that all helps, but if you have other questions or comments, definitely let us know them. We love hearing from our users, as that's where we've received most of our ideas for new features and improvements over the last (almost) 3 years of development.

Good luck,
Alex
The topic has been locked.