Group badges not showing
-
So you select multiple groups, save your profile, then reload, and it only has one group selected?
-
Nope, but from what you posted it seems there is an issue with saving the users selection into the database. When you select 2 groups and hit save it should show
["group1", "group2"]
in the `groupTitle field.Works fine on this forum as you can see from my group badges.
You would have to add some logging to see why admin selection is not saved maybe add some logging here to check the values https://github.com/NodeBB/NodeBB/blob/master/src/user/profile.js#L223
-
@baris I found this earlier
https://github.com/NodeBB/NodeBB/issues/9496#issue-861621005Is this related ? Seems like my exact issue and refined for the next release ?
Thanks
-
Can you try disabling various plugins?
-
@phenomlab it does seem to be the same issue. They mention they're running a lot of plugins which is what made me think of recommending disabling them.
-
Add a console.log to where I posted here https://github.com/NodeBB/NodeBB/blob/master/src/user/profile.js#L223. See what gets saved into groupTitle field when you hit save on the edit profile page. Also log the value of
meta.config.allowMultipleBadges
-
@pitaj said in Group badges not showing:
@phenomlab it does seem to be the same issue. They mention they're running a lot of plugins which is what made me think of recommending disabling them.
I've disabled the ones that I've added and aren't part of the base build, but the issue still persists.
-
@phenomlab console.log is a function you have to pass something to it
console.log(groupTitles, data.groupTitle, meta.config.allowMultipleBadges);
Also put it one line below, so it's below the closing curly brace.
-
The issue seems to be that on your forum the
serializeObject
dependency is pointing to something else. Maybe it is outdated.It should look like this
On your forum it is
And because of that when you click save changes on the profile edit page it is not converting the multiple group selections into a proper array.
-
@baris said in Group badges not showing:
What is your commit hash?
git rev-parse HEAD
?6b4ef46eadce177d51b609bf75df8acdaab61f0a
And the version of persona theme?
Installed 11.0.17
Did you make any modifications to the theme tpl files?
Yes, but only the addition of DIV containers, and breadcrumbs where I wanted them to be displayed.
-
@phenomlab said in Group badges not showing:
6b4ef46eadce177d51b609bf75df8acdaab61f0a
The issue seems to be the flatpickr dependency. It is overriden
serializeObject
which breaks core. -
@baris said in Group badges not showing:
The issue seems to be the flatpickr dependency. It is overriden serializeObject which breaks core.
How can I fix that ?