ProfileLinks broken after upgrade 0.6.1
-
Need to be pointed in the right direction
Just been working a plugin that adds a custom profile link
This was previously working in 0.6.0
However, just upgraded to 0.6.1, and well it stopped workingmy filter:user.profileLinks is like
links.push({ id: 'tipping_history', route: 'history', icon: 'fa fa-history', name: "Tipping history" });
When i navigate to the profile menu, it is not visible.
If i dig in and inspect the elements on the page i can see that it is embedded in the list, but the class contains 'hide' which is doing its job and hiding<li id="{profile_links.id}" class="plugin-link private hide"><a href="/user/gnasher/history"><i class="fa fa-fw fa fa-history"></i> Tipping History</a></li>
if i manually modify the page and remove hide, it will display my custom menu item,
but i am having some frustration finding where to sort that in my plugin programically.Additioanlly, 'id' is not being pulled from the above configuration
-
This should be fixed on the 0.6.x branch now.
NodeBB/public/src/client/account/header.js at v0.6.x · NodeBB/NodeBB
Node.js based forum software built for the modern web - NodeBB/public/src/client/account/header.js at v0.6.x · NodeBB/NodeBB
GitHub (github.com)
Although I am not sure why the id field is not parsed into the template.
-
Thanks @baris
The profile_links.id was an easy fix.
Problem existed within the programmer writing the pluginI will make a new pull request
Also, could you explain the meaning of the parameter 'public'
If i addpublic: true
This also makes it visible, but i am unsure of its intended usage
What is the impact upon the visibility and usabilityThanks
Redd
-
I imagine it is related to if the user is logged in or not.
-
@pitaj
Thats what i thought also, but if your logged out, you dont actually see a profile menu
So the setting seems moot.
Poking around in code, it could be useful, but maybe the potential has not been realised.
or
i haven't realised the potential
Just curious to understnd this as i like the idea of having user based menu -
I don't think public:true/false do anthing right now. I think it was intended to make some links visible to other users or make them private.
Ie if user A goes to user B's profile if public:true is set for that link user A will see that link in user Bs profile dropdown.