Please upgrade here. These earlier versions are no longer being updated and have security issues.

Utility/structure needed? once upgrade to 2.2.1 done

Recently upgraded from 2.2.5 (found @ GitHub's master branch 2014 Jan.) to this 2.2.1
It seems right but... now ;-) I should run utility/structure isn't ?

Not seen at your doc' upgrading instructions but previously (2.0 and 2.1 may be) it was "required" then do you know if I must do it now...
Many thanks in advance

Tagged:
«1

Comments

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited May 2016

    Yes it is you should do it. It can't hurt. You can run it several times even.

  • PamelaPamela ✭✭

    Ok, thanks @vrijvlinder and then ;-) tried it

    Fisrt time

    The following structure changes are required for your database.

    `update GDN_Role 'Role'
    set Type = 'applicant'
    where RoleID = '4';

    update GDN_Role 'Role'
    set Type = 'member'
    where RoleID = '8';

    update GDN_Role 'Role'
    set Type = 'unconfirmed'
    where RoleID = '3';

    update GDN_Role 'Role'
    set Type = 'guest'
    where RoleID = '2';

    delete from GDN_UserRole
    where UserID = '0';

    update GDN_User 'User'
    set Permissions = ''
    where Permissions <> '';

    alter table 'GDN_Tag'
    /* Existing: 'FullName' varchar(255) not null, New: 'FullName' varchar(100) not null */
    change 'FullName' 'FullName' varchar(100) not null;`

    Done and 'Rescan' once

    The following structure changes are required for your database.

    `update GDN_Role 'Role'
    set Type = 'applicant'
    where RoleID = '4';

    update GDN_Role 'Role'
    set Type = 'member'
    where RoleID = '8';

    update GDN_Role 'Role'
    set Type = 'unconfirmed'
    where RoleID = '3';

    update GDN_User 'User'
    set Permissions = ''
    where Permissions <> '';`

    So 'Rescan' and 'Rescan' and :( above is still displayed!
    Do you know if I could do something in order to fix it? thank to you

    Using PHP 5.5 and MySQL 5.6 / Apache 2.4

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    You can go into the mysql data base and change those values manually .

    Important Default roles are

    admin 1

    System 2

  • PamelaPamela ✭✭
    edited May 2016

    Yep, thanks to you @vrijvlinder for your support
    But it seems done, already ;-) in fact (phpMyAdmin screenshot, below)

    Voila... is it right ?

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    No, As I said before … admin is role 1 and System is 2 … Guest can't be 2

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator
    1. Your admin and moderator roles are not right (look at the column "type"). They should be "administrator" and "moderator".
    2. I get partly the same message:
    update GDN_Role `Role`
    set Type = 'applicant'
    where RoleID = '4';
    
    update GDN_Role `Role`
    set Type = 'member'
    where RoleID = '8';
    
    update GDN_Role `Role`
    set Type = 'unconfirmed'
    where RoleID = '3';
    

    And even running the sql manually on the database doesn't change anything on the message from utility structure. I guess there is a bug somewhere. I'll try to hunt it down...

    You should fix admin and moderator role and try SELECT count(*) FROM GDN_User WHERE Permissions = '' on the database. If it is not 0, you should run

    update GDN_User
    set Permissions = ''
    where Permissions <> '';
    

    manually.


    Pamela
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    You can safely ignore:

        update GDN_Role `Role`
        set Type = 'applicant'
        where RoleID = '4';
    
        update GDN_Role `Role`
        set Type = 'member'
        where RoleID = '8';
    
        update GDN_Role `Role`
        set Type = 'unconfirmed'
        where RoleID = '3';
    

    You have no chance to make that disappear. I've a pull request on GitHub and so I assume it will be fixed in the next Vanilla version.


    hgtonightPamelaLinc
  • PamelaPamela ✭✭

    @vrijvlinder said:
    No, As I said before … admin is role 1 and System is 2 … Guest can't be 2

    Ok @vrijvlinder, but tried a fresh install then Guest role is 2 and no System role, here!

    Really not an expert ;-) but Admin role seems to be 16 not 1, isn't ?

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    I guess vrijvlinder mixed this up with a column in the user table. Your roles are correct.


  • PamelaPamela ✭✭

    @R_J said:
    1. Your admin and moderator roles are not right (look at the column "type"). They should be "administrator" and "moderator".

    Exact... done via phpMyAdmin, thanks you @R_J

    Noticed than Unconfirmed role still deletable (1, it should be 0 ?) but ;-) not important (at this time)

  • PamelaPamela ✭✭

    @R_J said:

    You should fix admin and moderator role and try SELECT count(*) FROM GDN_User WHERE Permissions = '' on the database. If it is not 0, you should run

    update GDN_User
    set Permissions = ''
    where Permissions <> '';
    

    manually.

    Well, as said above, manually ;-) added these moderator and administrator types in 'GDN_UserRole' table, 'Type' column

    Later tried your query, result is 9, so :( not 0
    In fact there 're 11 members

    • My first admin account: a:34:{i:0;s:17:"Garden.Email.View";i:1 etc
    • System: NULL
      but all others 're empty (11-2=9)

    Noticed than once a user/member is logged in then something is added to this 'Permissions' column
    but not all members 'll be back...

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator
    edited May 2016

    If it is a clean install, I would have thought that unconfirmed has deletable = 0
    https://github.com/vanilla/vanilla/blob/master/applications/dashboard/settings/structure.php#L51
    $RoleModel->define(array('Name' => 'Unconfirmed', 'Type' => RoleModel::TYPE_UNCONFIRMED, 'RoleID' => 3, 'Sort' => $Sort++, 'Deletable' => '0', 'CanSession' => '1', 'Description' => t('Unconfirmed Role Description', 'Users must confirm their emails before becoming full members. They get assigned to this role.')));

    But that is not checked in /utility/structure so it is no wonder that it is not changed


  • PamelaPamela ✭✭

    @R_J said:
    I guess vrijvlinder mixed this up with a column in the user table. Your roles are correct.

    Yep, @vrijvlinder check out GDN_User, in this 'Admin' table, my first admin is 1 and my system is 2 (other members is 0)

    vrijvlinder
  • PamelaPamela ✭✭

    @R_J said:
    You should fix admin and moderator role and try SELECT count(*) FROM GDN_User WHERE Permissions = '' on the database. If it is not 0, you should run

    update GDN_User
    set Permissions = ''
    where Permissions <> '';
    

    manually.

    Did you mind @R_J the following query?

    update GDN_User `User`
    set Permissions = ''
    where Permissions <> '';
    
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    They are identical.

    In SQL you can give alias names to tables. This is very comfortable if you have a query that joins multiple tables. If you are working with only one table, an alias is not needed.
    The one thing I hate about SQL is the use of apostrophes and so I simply left that part out.


  • I tried to run the commands above, but i still shows me 13 counts. Am I understanding it right that all my members should have a "null" in the permissions table?

    I still get

    update GDN_User User
    set Permissions = ''
    where Permissions <> '';

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    I've made a mistake: SELECT count(*) FROM GDN_User WHERE Permissions <> ''. Since all users where Permissions are not empty (empty, not NULL) should be changed, you should only count them.

    But what appears when you run /utility/structure? Please don't get confused just because of my hackish SQLs. The output of the official SQLs are much more important.


  • 'update GDN_Role Role
    set Type = 'applicant'
    where RoleID = '4';

    update GDN_Role Role
    set Type = 'member'
    where RoleID = '8';

    update GDN_Role Role
    set Type = 'unconfirmed'
    where RoleID = '3';

    update GDN_User User
    set Permissions = ''
    where Permissions <> '';'

    I get this Output. All Users (beside my logged in admin) have empty permissions.


    When i run your script it counts "1".

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Please post a list of all activated addons and plugins (from your config.php the sections // EnabledApplications and // EnabledPlugins

    I do not even get that message if I write values in that column and so this message is coming from a plugin/addon you are using.


  • PamelaPamela ✭✭

    @R_J said:
    They are identical.

    In SQL you can give alias names to tables. This is very comfortable if you have a query that joins multiple tables. If you are working with only one table, an alias is not needed.
    The one thing I hate about SQL is the use of apostrophes and so I simply left that part out.

    Well, thanks @R_J then I 'll try it

Sign In or Register to comment.