Topic-icon Problem with JomSocial registration

10 years 8 months ago - 10 years 8 months ago #35383 by chramb1
I have the latest versions of everything (JFBC, JomSocial 3.0.1 and Joomla 3.1.5) installed. I have my system set up to integrate everything and such that when "register with Facebook" is used, it pre-loads those fields that it can with Facebook values and lets the user do the rest.

This all works.

If, however, a user changes their profile type, this causes a reload of the page to a new URL that my web server chokes on.

The initial URL for registration is:

www.element67.com/component/jfbconnect/?...bml0eS9yZWdpc3Rlcg==

Changing the profile type, it then tries to go to:

www.element67.com/component/jfbconnect/i...egister&profile_id=3

This URL is clearly wrong, as it uses the base for the component (/component/jfbconnect/) but then appends index.php and the rest of the arguments. Looking at the select, the HTML appears to want to set the URL relatively, which means that the component base is going to get picked up. This makes for an invalid URL.

<select onchange="var jfbcProfilesCommunityType = $('profile_id').value;window.location.href = 'index.php?option=com_jfbconnect&amp;view=loginregister&amp;profile_id='+jfbcProfilesCommunityType;" name="profile_id" id="profile_id" class="" aria-invalid="false">
<option selected="selected" value="2">Fan</option>
<option value="1">Performer</option>
<option value="3">Cast</option>
</select>

Help, please?
Last edit: 10 years 8 months ago by chramb1.
The topic has been locked.
Support Specialist
10 years 8 months ago #35413 by alzander
Christopher,
Thanks for the report. It looks to be a bug in our JomSocial plugin. To fix, edit /plugins/socialprofiles/jomsocial/jomsocial.php . Around line 84, you'll see:
"window.location.href = 'index.php?option=com_jfbconnect&view=loginregister&profile_id='+jfbcProfilesCommunityType;";
Update that to:
"window.location.href = jfbc.base + 'index.php?option=com_jfbconnect&view=loginregister&profile_id='+jfbcProfilesCommunityType;";
That should properly put in the root of your domain so it's no longer a relative link. Alternatively, you should just be able to put a leading / on the URL like:
"window.location.href = '/index.php?option=com_jfbconnect&view=loginregister&profile_id='+jfbcProfilesCommunityType;";
Feel free to try either and let us know how it goes. We'll get this tested and fixed in the upcoming release as well, but would love your feedback beforehand.

Thanks,
Alex
The topic has been locked.
10 years 8 months ago #35417 by chramb1
Resolved.

I put in the code to add jfbc.base and it does, indeed, work properly now. I'd also added the slash in my testing, but using your base is clearly the better solution, as it allows for changing the base if necessary.

Thanks much!
The topic has been locked.
Support Specialist
10 years 8 months ago #35421 by alzander
Christopher,
Glad that worked and thanks for the feedback. I've already checked in that change to our profile plugin and it will be in the release next week.

Thanks again,
Alex
The topic has been locked.