Viewing user profiles from a userlist loses Itemid

11 years 3 months ago - 11 years 3 months ago #152086 by vahekassardjian
Itemid issues seems pretty common.

Those posts seem related to my problem:

My problem is (seems) simple:
I have a menu item in my main menu called "Members" (ItemID = 14; access is Public; however the module holding it is Registered access).
This "Member" menu item points to a CB list (List id = 2):
index.php?option=com_comprofiler&task=userslist&listid=2&Itemid=14

When I click on a user to view its profile, it takes an ItemID of 2
index.php?option=com_comprofiler&task=userProfile&user=75&Itemid=2
which is the ItemID of the mandatory Community Builder User Profile menu item.

Problem is I lose the fact that I'm in the "Members" menu.
My question is: how do I force those user profile links to keep the ItemID of 14?

CB 1.3
Joomla 1.5.22

Please Log in to join the conversation.

11 years 3 months ago #152208 by krileon

My question is: how do I force those user profile links to keep the ItemID of 14?

You can't; users will always be sent to the mandatory profile view itemid unless one is not provided, but not providing such a menu link would cause problems with link structures in your install.


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 3 months ago #152221 by vahekassardjian
Replied by vahekassardjian on topic Re: Viewing user profiles from a userlist loses Itemid
What is the best place to hardcode the ItemID I want associated with user profiles (other than my own profile which of course is already assigned the correct ItemID).

I only have one user list displayed by one menu.

Thanks

Please Log in to join the conversation.

11 years 3 months ago #152247 by krileon
I don't suggest such a change, but it can be done at the following location. Please note without some kind of IF check for the userlist ID it will affect all userlists.

IN: components/com_comprofiler/comprofiler.html
ON: Line 760
FROM:
				$jsClickTr		.=				"'" . cbSef( 'index.php?option=com_comprofiler&task=userProfile&user=' . $user->id . getCBprofileItemid( true ), false ) . "',";
TO:
				$jsClickTr		.=				"'" . cbSef( 'index.php?option=com_comprofiler&task=userProfile&user=' . $user->id . '&Itemid=ITEM_ID', false ) . "',";

Simply change ITEM_ID to the ID of your choice (e.g. 12).


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 3 months ago #152308 by vahekassardjian
Replied by vahekassardjian on topic Re: Viewing user profiles from a userlist loses Itemid
Thanks Krileon. Assuming you meant components/com_comprofiler/comprofiler.html.php.
It doesn't seem to be the location where the user profiles links are generated. Even if I comment the whole line the user profile links are still there.
I might want to lookup other occurences of getCBprofileItemid to find the correct location.

Please Log in to join the conversation.

11 years 3 months ago #152390 by krileon

Thanks Krileon. Assuming you meant components/com_comprofiler/comprofiler.html.php.

Yes, sorry.

It doesn't seem to be the location where the user profiles links are generated. Even if I comment the whole line the user profile links are still there.

Hmm, shouldn't be the case as that's where the JS is defined that links each row. You'll need to refresh a couple of times after changing as JS does not instantly update (it's local and not server side so is cached). Also, are you clicking the username for example or just the table row?


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.385 seconds

Facebook Twitter LinkedIn