Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

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.

Thanks.

Comments

  • Did you use the Porter utility?

  • 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.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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.

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

    Kind regards,
    oneninetyeight

Sign In or Register to comment.