1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Updated to 1.0.4 from 1.0.2 (New register user perm issue)

Discussion in 'Installation, Upgrade, and Import Support' started by Kainzo, Sep 23, 2011.

  1. Kainzo

    Kainzo Active Member

    I just updated and now when someone registers they cant see anything on the forum, it tells them that they dont have permission...

    I want new registered users to automatically be in a group that can at least see the public things that 'guests' can see - it was like this before the update but im not sure what broke or what happened =/

    Home
    Forums>

    You do not have permission to view this page or perform this action.

     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Make sure this permission is enabled for the Registered group (group id 2):

    Admin CP -> Users -> List User Groups -> Registered -> View
     
  3. Kainzo

    Kainzo Active Member

    It is set to "allow" for the General Permissions.

    When I look at the new user I don't see them as the "Registered" as their primary.. I see them under "Administrative"

    However, when I search for all administrative group users only 3 come up (and not the new users).
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Check the group ids. Registered should be 2. Administrative should be 3. Maybe you renamed them. New users are assigned to group id 2 regardless of the name.

    The ids are visible in the URL when you edit a group:

    Admin CP -> Users -> List User Groups -> [click a group]

    But more generally, you need to check the View permission for all groups to which that user belongs. It must be disabled somewhere for that user.
     
  5. Kainzo

    Kainzo Active Member

    Strangely enough, I see no user group 2. I've gone through all of them, Administrative is 3 ... Unregistered/Unconfirmed is 1 and Registered is (8) admin.php?user-groups/registered.8/edit

    The test user "Hrumph" is has no groups "checked" and the primary display group is "Administrative"
     
  6. Kainzo

    Kainzo Active Member

    thanks for helping btw, I do appreciate it!
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yeah that's not good. You are missing 2. What about id 4? That should be Moderating.

    The software doesn't let you delete the default groups (1-4) so those records must have been lost by some other means. The upgrade should not have resulted in this. Did you perform any other major maintenance lately? A server move, database restore, anything like that? Do you have a backup that you can use?

    We can try manually updating the ids by querying your database, but there are several tables involved so that isn't my first choice.

    You can also change the id assignments of the default groups but that's an ugly fix:

    http://xenforo.com/community/threads/changing-default-group-assignments.16519/
     
  8. Kainzo

    Kainzo Active Member

    admin.php?user-groups/moderators.12/edit

    It doesn't look like 4 is present either.

    We didn't do any other major maintenance. We did change the passwords for a database or two but that's it (and reflected the changes in Xen)
     
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    In that case I'm gonna make you some queries to update your group ids. Will report back.
     
  10. Kainzo

    Kainzo Active Member

    Oh, that'd be nice :) I was looking into your 'messy' approach but I'd like to avoid changing that cause each update it'd hurt.
     
  11. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Ok this is what I have for you:

    Code:
    UPDATE xf_admin
    SET extra_user_group_ids = REPLACE(extra_user_group_ids, '8', '2');
    
    UPDATE xf_moderator
    SET extra_user_group_ids = REPLACE(extra_user_group_ids, '8', '2');
    
    UPDATE xf_permission_combination
    SET user_group_list = BINARY REPLACE(CONVERT(user_group_list USING utf8), '8', '2');
    
    UPDATE xf_permission_combination_user_group
    SET user_group_id = 2
    WHERE user_group_id = 8;
    
    UPDATE xf_permission_entry
    SET user_group_id = 2
    WHERE user_group_id = 8;
    
    UPDATE xf_permission_entry_content
    SET user_group_id = 2
    WHERE user_group_id = 8;
    
    UPDATE xf_user
    SET user_group_id = 2
    WHERE user_group_id = 8;
    
    UPDATE xf_user
    SET secondary_group_ids = REPLACE(secondary_group_ids, '8', '2');
    
    UPDATE xf_user_group
    SET user_group_id = 2
    WHERE user_group_id = 8;
    
    UPDATE xf_user_group_change
    SET group_ids = REPLACE(group_ids, '8', '2');
    
    UPDATE xf_user_group_relation
    SET user_group_id = 2
    WHERE user_group_id = 8;
    
    UPDATE xf_user_upgrade
    SET extra_group_ids = REPLACE(extra_group_ids, '8', '2');
    
    These queries will replace all references to id 8 with id 2 thereby fixing your Registered groupid.

    Backup first. This appears to work in my testing but I guarantee nothing. These are some invasive queries.
     
  12. Kainzo

    Kainzo Active Member

    It now shows this
    orum/admin.php?user-groups/registered.2/edit

    I think that resolves it :)
     

Share This Page