Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

multiple duplicates of "roles & permission" levels

I've noticed that I have multiple copies of the "roles & permission" levels in the backend of my forum. I've updated to 2.3.1 today to see if that might solve the issue but it didn't.

Any advice how this came about? I'm concerned deleting a role might delete all of the instances of that role.



  • Options

    Did you use the Porter utility?

  • Options
    edited September 2017

    Uhm no, what is that? Should I have used it? I followed the standard upgrading instructions from github.

    I should note that I set my forum up in Vanilla and never imported content from another forum software. I don't know when this happened as I haven't been administrating it myself for a while.

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    No, you shouldn't have used the porter, but if you had, it could be what has causes the described problem ;)

    First of all you should find out if there are duplicates in the database or if you only see duplicates. Please use this query on your database and show the results here (if there are duplicates): SELECT * FROM GDN_Role

    If there are no duplicates in the database but only in the dashboard view, you have some kind of problem that I'm not sure how to even debug.

    But if you have duplicates in the database, you would have to look for users in one of those duplicate roles. The expected result for the query above would be similar to this:
    RoleID 2, Guest
    RoleID 3, Unconfirmed
    RoleID 4, Applicant
    RoleID 8, Member
    RoleID 16, Admin
    RoleID 32, Moderator

    Therefore, if you run the query SELECT * FROM GDN_UserRole WHERE RoleID NOT IN (2,3,4,8,16,32) you would see all users not having the standard role.

    If there are no results for the query, those phantom roles are not used anywhere and therefore can be deleted.

    Deleting anything is always risky. Please make a backup of your database!. You can change the above query to SELECT * FROM GDN_UserRole WHERE RoleID NOT IN (2,3,4,8,32) which should show you all admins. This way you can be sure that the query is working as expected. And then you should be able to delete those roles without any bad consequences. Just be sure to delete the addtional roles. Deleting them by sql to be sure not to delete a default RoleID might be more safe in this case.

  • Options

    Thanks for this information. I'll check it out and let you know if that solved the issue.

    Kind regards,

Sign In or Register to comment.