+ Start a Discussion
Darrell Waddell 223Darrell Waddell 223 

Navigation Menu error in Community Builder when adding menu item

I'm having issues with adding a Menu Item to the Navigation Menu within Community Builder.

User-added image
User-added image

This is what I want: Add a menu item called "My Profile" and have it go directly to the User Profile page.
What's happening: The URL for My Profile requires one or more parameters. Please replace each parameter with the appropriate value.

Name: My Profile

Type: Community Page
Page: User Profile
URL: /profile/:recordId

Tapendra Thakur 3Tapendra Thakur 3
Hi, Even I am facing the same issue.Did u find the resolution?Please help.
Naveen DhanarajNaveen Dhanaraj
This would Help you,
Community Navigation Menu Parameter Error----https://help.salesforce.com/articleView?id=000233347&type=1
guyweguywe
I am trying to do exactly the same. The fix from @Naveen Dhanaraj got the menu item displaying (by removing the colon) but now I get an Invalid Page message. Requirement is simple to display "My Profile" as a menu tab.
Helen Lei 7Helen Lei 7
I have the same issue. Any workaround here? Thanks.
Veda RamamoorthyVeda Ramamoorthy
Hi, I would like to implement the same. Can someone pls advise? Alternatively, I am also trying to use the component - User Profile/user summary etc  that is available on the components menu on the left. But I see that it is available only to the user profile page and not other pages in the builder mode. How to make it available to other community custom pages? Pls answer !
Prashant Pandey07Prashant Pandey07
Hi Darrell,
I had the kind of similar situation where I need to naigate to standrd object listview and the Menu type is Community Page..
URL parameter in the Napili Community is very confusing and I have better workaround to reslove the issue.

1- > Create a apex controller to get the logged in user profile  

   @AuraEnabled
    public static Profile getLoggedInProfile() {
      Profile loggedinUser = [SELECT Name FROM Profile WHERE Id = :UserInfo.getProfileId() LIMIT 1];
        return loggedinUser;
  }

2-> Create a Lightning Component and fire the event on page load/Refresh with Init event that uses force:navigateToSObject based on the Id from Step 1. This takes you to the Desiser Profile Page.

   retunProfile: function(component, event, helper) {
    
    var action = component.get("c.getLoggedInProfile");
    action.setCallback(this, function(response) {
        Var state = response.getState();
        if (state === "SUCCESS") {
            Var loggedInUser = response.getReturnValue();
            Var navEvt = $A.get("e.force:navigateToSObject");
            navEvt.setParams({
                "recordId": loggedInUser.Id,
                "slideDevName": "detail"
            });
            navEvt.fire();
        }
    });
    $A.enqueueAction(action);
}

3-> The component will be kind of 

<aura:component implements="forceCommunity:availableForAllPageTypes access="global" >
//You may add other desired attributes
    <aura:handler name="init"  value="{!this}" action="{!c.retunProfile}"  />
</aura:component>

4-> Goto Napili Community Builder select newly created component from the drop down menu and publish.

I hope this should solve your issue.

--
Thanks,
Prashant
Robin BarnwellRobin Barnwell
I got this working by changing the URL parameter as suggested from:
URL: /profile/:recordId
To this:
URL: /profile/00558000000fiNY
But hardcoding isn't much good, want to find a way for it to pick-up the current user record id.......

 
Jorge Ponce 9Jorge Ponce 9
Hello Robin

Did you get this solved?  I also need to understand how to do this.  It seems that in the lightning community, you can't pass values via URL dynamically.  

Cheers
James ButcherJames Butcher
Same problem for me too.  I'd like to have menu items like "User Profile" or "User Settings", but I get "Oops, something went wrong.
Please refresh the page and try again" when they are clicked.
Thales ChrisThales Chris
I don't know if your issue has already been resolved but I thought I'd share this video here, it explains very well how to set the navigation bar correctly: https://www.youtube.com/watch?v=alwWI1sQwHw
Robin BarnwellRobin Barnwell
Doesn't look like passing in the RecordId dynamically works though, the examples use hardcoded RecordIDs.

The best solution still looks like build and deploy your own Lightning Components.
ParidhiBindalParidhiBindal

I am stuck here. did anyone find a solution to fix it as I don't want to hardcode the recordID, I want it to get picked as it gets picked for User Profile page for My Profile under Profile Menu.

Please help.
Thanks.

Goldy Raj 4Goldy Raj 4
hi,

how can i diable the navigation bar
Andy Jones 12Andy Jones 12
Also having this problem. Hardcoding is no good, and would ideally like to use out of the box rather than developing new components to achieve what should be achieveable! 
Nick Brown 18Nick Brown 18
It is amazing to me how much base functionality requires coding efforts or professional services assistance.  But hey, at least the liceneses are cheap right!
Derina Nunes 7Derina Nunes 7
Can some please update ,how we can do the above as we cannot hardcode ids in this page.URGENT.
This is very illogical as I want to show respective profile page of logged in community users to the users and coding or creating component for  such basic requirement is not productive
Rachel HandsRachel Hands
Hi folks, I've run into the same problem today, and I've created an IdeaExchange Idea to allow this to happen without creating a custom component and using CSS: https://success.salesforce.com/ideaView?id=0873A000000LtMlQAK - I'd appreciate your upvotes!