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

Upgrade from 2.3: Lost all user roles

Hey,

I updated from 2.3 to 2.5 and everything seems to work fine. The only thing that happened was, that all user roles were gone. What I did was to make guests "guests" again, members "members" and so on. Is that correct?

Furthermore, I had to give all existing members their "member" role again. As there are only twenty or so of them that was no big deal.

Two questions I have now:

  1. Is that just a little glitch or do I have to search for an underlying problem?
  2. As admin, when I try to view "Settings > Forum Data > Import" or "Moderation > Content > Version" I get the message that I am not allowed to do that (as admin). Could you help me with that?

Any feedback is highly appreciated. Thanks for you time guys and a big thanks to the developers.

Comments

  • I just realized, registering as a new user does not work.

    Duplicate entry '3881-8' for key 'PRIMARY'|Gdn_Database|Query|insert GDN_UserRole (UserID, RoleID) values (:UserID, :RoleID)

    This is the error message. When logged in as admin, the user gets listed though.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    I would do a clean install of Vanilla and import the role table. If you do not have many custom roles that would be the best start.

    **If you have a backup of your database*, simply try this one:

    DROP TABLE IF EXISTS `GDN_Role`;
    CREATE TABLE `GDN_Role` (
      `RoleID` int(11) NOT NULL AUTO_INCREMENT,
      `Name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
      `Description` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
      `Type` enum('guest','unconfirmed','applicant','member','moderator','administrator') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
      `Sort` int(11) DEFAULT NULL,
      `Deletable` tinyint(4) NOT NULL DEFAULT '1',
      `CanSession` tinyint(4) NOT NULL DEFAULT '1',
      `PersonalInfo` tinyint(4) NOT NULL DEFAULT '0',
      PRIMARY KEY (`RoleID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    INSERT INTO `GDN_Role` (`RoleID`, `Name`, `Description`, `Type`, `Sort`, `Deletable`, `CanSession`, `PersonalInfo`) VALUES
    (2, 'Guest',    'Guests can only view content. Anyone browsing the site who is not signed in is considered to be a \"Guest\".', 'guest',    1,  0,  0,  0),
    (3, 'Unconfirmed',  'Users must confirm their emails before becoming full members. They get assigned to this role.',    'unconfirmed',  2,  0,  1,  0),
    (4, 'Applicant',    'Users who have applied for membership, but have not yet been accepted. They have the same permissions as guests.', 'applicant',    3,  0,  1,  0),
    (8, 'Member',   'Members can participate in discussions.',  'member',   4,  1,  1,  0),
    (16,    'Administrator',    'Administrators have permission to do anything.',   'administrator',    6,  1,  1,  0),
    (32,    'Moderator',    'Moderators have permission to edit most content.', 'moderator',    5,  1,  1,  0);
    
  • Thank you very much, I tried that in myPhpAdmin, but it did not help.

    I would do a clean install. Can you tell me (for beginners) what I should do to save my forum entries? I do have a backup of the 2.3 database and Vanilla install.

    Should I clean install 2.5 and then import the old data somehow?

    Thanks a lot!

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... Moderator

    @co_smo

    I think the idea is to do a separate, clean install of 2.5, then simply copy over the role table from that fresh install to your live DB. (Having made a backup of your live DB, obviously!)

    That's what I have done in the past to resolve role table issues.

  • Thank you, understood. I made a separate clean install, exported the GND_Role table and inserted it into the live one. No change. The SQL query result is this:

    DROP TABLE IF EXISTS `GDN_Role`;# MySQL returned an empty result set (i.e. zero rows).
    
    CREATE TABLE `GDN_Role` (
    `RoleID` int(11) NOT NULL AUTO_INCREMENT,
    `Name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `Description` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `Type` enum('guest','unconfirmed','applicant','member','moderator','administrator') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `Sort` int(11) DEFAULT NULL,
    `Deletable` tinyint(4) NOT NULL DEFAULT '1',
    `CanSession` tinyint(4) NOT NULL DEFAULT '1',
    `PersonalInfo` tinyint(4) NOT NULL DEFAULT '0',
    PRIMARY KEY (`RoleID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=33 ;# MySQL returned an empty result set (i.e. zero rows).
    
    
    --
    -- Dumping data for table `GDN_Role`
    --
    
    INSERT INTO `GDN_Role` (`RoleID`, `Name`, `Description`, `[...]
Sign In or Register to comment.