Hi,
Community Builder version 2.8.0+build.2023.03.17.19.11.55.64386eb8d
i have a number of Community Builder lists.
I have one with an id of 4, that has no menu associated with it
I have another with an id of 46, that has a menu associated with it with itemid=540
When community builder displays the list of lists on the frontend, trying to go to list with id=4 gives me list 46 instead.
This query in getCBprofileItemid in LegacyFoundationFunctions.php seems to be the problem:
$query = 'SELECT ' . $_CB_database->NameQuote( 'id' )
. "\n FROM " . $_CB_database->NameQuote( '#__menu' )
. "\n WHERE ( " . $_CB_database->NameQuote( 'link' ) . " LIKE " . $_CB_database->Quote( 'index.php?option=com_comprofiler&view=' . $_CB_database->getEscaped( $view, true ) . $additional . '%', false )
. ' OR ' . $_CB_database->NameQuote( 'link' ) . ' LIKE ' . $_CB_database->Quote( 'index.php?option=com_comprofiler&task=' . $_CB_database->getEscaped( $view, true ) . $additional . '%', false ) . ' )'
. $queryAccess;getCBprofileItemid view=userslist additional=&listid=4
The like clause means looking for listid=4 returns 46 instead!
I've fixed this by changing all the ids of my lists in the database to ensure no clashes!
Create a menu item for each user list. Then ensure you've a public menu item to CBs profile page (this is mandatory and acts as a fallback). Joomla doesn't much care for URLs missing an associated menu item so it can cause lookup issues like this. The wildcard query is just a fallback if there is no associated Joomla menu item we have to basically guess where you're trying to go.
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.