×

Error

Please login first

User redirected to other profile after update

11 years 11 months ago - 11 years 11 months ago #202822 by jfjweb
Hi,

We currently trying to provide login access to our staff on our website and decided to use Community Builder. As of now, this feature of our website is still on it's development stage. During testing, we are having some issues where in user's are being redirected to a different profile after updating their own profile. Any help on pointing the cause of the issue and possible fix would be greatly appreciated.

Joomla 1.5
CB 1.8

Thanks,
Jay Jose
Sr. Software Developer
Jews for Jesus

Please Log in to join the conversation.

11 years 11 months ago #202902 by krileon
If caching is enabled, disable it, and purge existing cache. Once done attempt to test again with debug mode and maximum error reporting enabled within Joomla global configuration (allows fatal errors to be exposed).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

11 years 11 months ago #202949 by jfjweb
Hi Kyle,

We are not using cache on our site. We also turned on maximum debugging, but it is not getting an error.

We realized that when a user is logged in the default "my profile" link strips out the user id and with our sef settings ACEsef doesn't know which user profile to pull. If we turn off AceSEF the function works fine, no problems. We are very much invested in AceSEF at this point.

After a few days of testing, debugging and code tracing, we found out that the userProfileUrl function assigns a null value to the userid if the id is equal to the current logged in user. I think, AceSEF is not able to catch that null userid is equal to the current logged in user, thus giving a wrong profile in the return URL.

In order to correct the profile URL current issue, we decided to comment out line 2870 of administrator/components/com_comprofiler/plugin.foundation.php
function userProfileUrl( $userId = null, $htmlSpecials = true, $tab = null, $format = 'html' ) {		if ( $userId && ( $userId == $this->myId() ) ) {			/*$userId		=	null;*/		}
		return $this->cbSef( 'index.php?option=com_comprofiler' . ( $userId ? '&task=userprofile&user=' . (int) $userId : '' ) . ( $tab ? '&tab=' . urlencode( $tab ) : '' ) . getCBprofileItemid( false ), $htmlSpecials, $format );	}

Doing this solved our first issue, but the redirect after updating your profile still uses a different function that we have not been able to track to this point.

Questions:
1) What's the reason for assigning null value if it's the same as the current user? This is what causes the problem for ACEsef.
2) Will there be any issue to other area/function if we comment this line out?
3) How can we do the same for the redirect function?

Thanks,
Emmanuel and Jay

Please Log in to join the conversation.

11 years 11 months ago #202953 by krileon
The URL for self is index.php?option=com_comprofiler; no null value is assigned because the IF statement stops &user from being appended entirely and this is intentional. This has always been the case. When viewing your own profile it's not supposed to have user appended to it. We also only support Joomla SEF as 3rd party SEF tends to cause too many issues and carelessly handles parameters. I recommend setting your SEF to simply ignore the CB component. Do not make core edits, once you've done so you are voiding support and we can not help you with core edits in place.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

11 years 11 months ago #202957 by jfjweb
Thanks for the prompt response!

We understand the problem with changing core code. We don't want to change it either. Until we move to Joomla 2.5 (at least 1 year away) we are stuck with this problem though as the URLs we had from a previous (non Joomla) site need to be intact. For this reason we cannot use the Joomla SEF. We have over 40,000 internal links on our website and over 300 users.

Maybe you can point us in the right direction of how we could pass the user id along with the non-sef url so we can modify the ACEsef plugin that they provide for community builder? This way we wouldn't have to modify the core cb code.

Do you have any other ideas/suggestions?

Emmanuel and Jay

Please Log in to join the conversation.

11 years 11 months ago #202968 by krileon

Maybe you can point us in the right direction of how we could pass the user id along with the non-sef url so we can modify the ACEsef plugin that they provide for community builder? This way we wouldn't have to modify the core cb code.

Sorry, can't help you with that. ACEsef should support URL with and without &user as without &user is self.

Do you have any other ideas/suggestions?

You can try purging CBs SEF links and let it rebuild them. Perhaps that will help.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.226 seconds

Facebook Twitter LinkedIn