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.

2.1 Roles & Permission not working properly

Whenever I try to change permission on any given role and upon saving it, it rolls back to default selection.

Is it only my setup or is it bug?

Version 2.1
Fresh Install

«13

Comments

  • LincLinc Detroit Admin

    Have you run /utility/update and gotten the 'success' message?

  • Well this was fresh install, not update. But I will try that.

  • gohuntergohunter
    edited April 2014

    @Lincoln‌,

    Yep it is still same. I got the success message.

  • LincLinc Detroit Admin

    For the record, no, I can't reproduce this on my copy of 2.1.

    Can you enable debug mode and see if any errors show up?

    Try going to /utility/structure and see if it requests any changes.

    Are you using MySQL strict mode?

  • gohuntergohunter
    edited April 2014

    How can I check if it is in the MySQL is in strict mode?

    I will enable the debug mode and see if I get any.

  • Reading and researching more about MySQL strict mode...

  • after running /utility/structure

    Gives me this:
    Need to re-index theme cache
    Info Need to re-index plugin cache

    and I did the Run Structure & Data Scripts process yet still have the above messages are showing up.

    Enabled the debug mode in the config.php with

    $Configuration['Debug'] = TRUE;

    and since there is no actual error message, it is not showing any...

  • hgtonighthgtonight ∞ · New Moderator

    Did you import data from another forum?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    peregrine
  • peregrineperegrine MVP
    edited April 2014

    load version check plugin. there is an option for phpinfo in the sidebar (which is handier than just creating a phpinfo page , because only you the admin have access to it) . you can click on that and get info on mysql as well as many other things about your setup).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • gohuntergohunter
    edited April 2014

    @hgtonight‌.

    Yes, I did.

    @peregrine‌ Thanks for the tip, I'm doing it right now!

  • peregrineperegrine MVP
    edited April 2014

    .

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • gohuntergohunter
    edited April 2014

    My previous version was Version 2.0.18, and that is all the database came from.

    Still not able to find if it is set to MySQL strict mode, but thanks to version check plugin.

    mysql
    
    MySQL Support   enabled
    Active Persistent Links 0
    Active Links    0
    Client API version  5.5.34
    MYSQL_MODULE_TYPE   external
    MYSQL_SOCKET    /Applications/MAMP/tmp/mysql/mysql.sock
    MYSQL_INCLUDE   -I/Applications/MAMP/Library/include
    MYSQL_LIBS  -L/Applications/MAMP/Library/lib -lmysqlclient
    
    Directive   Local Value Master Value
    mysql.allow_local_infile    On  On
    mysql.allow_persistent  On  On
    mysql.connect_timeout   60  60
    mysql.default_host  no value    no value
    mysql.default_password  no value    no value
    mysql.default_port  no value    no value
    mysql.default_socket    /Applications/MAMP/tmp/mysql/mysql.sock /Applications/MAMP/tmp/mysql/mysql.sock
    mysql.default_user  no value    no value
    mysql.max_links Unlimited   Unlimited
    mysql.max_persistent    Unlimited   Unlimited
    mysql.trace_mode    Off Off
    
    mysqli
    
    MysqlI Support  enabled
    Client API library version  5.5.34
    Active Persistent Links 0
    Inactive Persistent Links   0
    Active Links    0
    Client API header version   5.5.34
    MYSQLI_SOCKET   /Applications/MAMP/tmp/mysql/mysql.sock
    
  • peregrineperegrine MVP
    edited April 2014

    when you try to change permissions on a role - and click save - does it show a message that it is saving.

    did you use the porter plugin to import data or did you use phpmyadmin or some other method. to install your 2.1.18.x data.

    please step through the process of what you did starting form the beginning.

    dis you ever port from a non-vanilla forum, or use the porter plugin.

    all questions need to be answered.

    alternatively you could load a second vanilla 2.1 installation and export the roles table and the permissions table and import those into your problem database.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • hgtonighthgtonight ∞ · New Moderator

    I am guessing you used the porter script to export the data from 2.0.18 and imported it in a fresh install of 2.1?

    I believe that process mangles the permission table just so slightly that it still works but fails validation when you try to modify role permissions.

    Mind sharing a dump (including structure) of your GDN_Permission and GDN_Role tables?

    I can probably help you sort it out.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • gohuntergohunter
    edited April 2014

    Thank you for looking into it. I will collect everything you asked and be back shortly!

  • peregrineperegrine MVP
    edited April 2014

    I am guessing you used the porter script to export the data from 2.0.18 and imported it in a fresh install of 2.1?

    and this should NOT be done. don't use porter to move from one vanilla version to another vanilla version.

    you should use phpmyadmin or mysql to import and export.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    hgtonight
  • gohuntergohunter
    edited April 2014

    I just installed 2.1 fresh and didn't mess with it. Tried everything as it is in virgin state.

    Not getting the role and permission issue I had before. The issue must be in the database I imported.

    @peregrine said:

    when you try to change permissions on a role - and click save - does it show a message that it is saving.

    Please refer to attached image #1.

    When I first go to Guest role, and try unchecking everything except Discussion and hit save. all the check marks rolls back what it was in the beginning and went back to the main page for the roles and permission. There was error message or anything, but your saved successfully notification flashed super fast.

    When you go back to Guest role, only changes made was Discussion box was thicked, but I wanted everything unchecked except Discussion.

    This issue is persistent through out all the roles and permission.

    @peregrine said:

    did you use the porter plugin to import data or did you use phpmyadmin or some other method. to install your 2.1.18.x data.

    1. Exported with Navicat by my coworker and it is in .sql
    2. Used Vanilla Porter 2.0.0 to convert into Vanilla format to import with vanilla import. Didn't know I can import with porter plugin,

    @peregrine said:

    >

    dis you ever port from a non-vanilla forum, or use the porter plugin.

    >

    No.

  • One thing I noticed is that with the fresh install nothing added or changed it doesn't have "delete" button next to some roles. but with my data, it has. please refer to image #2.

  • gohuntergohunter
    edited April 2014

    @hgtonight said:
    I am guessing you used the porter script to export the data from 2.0.18 and imported it in a fresh install of 2.1?

    That is exactly. I have 2.1rc1 currently active as well. I tried it on it and it is same as 2.1.

    @hgtonight said:
    Mind sharing a dump (including structure) of your GDN_Permission and GDN_Role tables?

    Should I pm you?

  • hgtonighthgtonight ∞ · New Moderator

    @gohunter said:
    Should I pm you?

    If you want to, go for it. Those tables don't show any user information in any way so unless you are developing something that you want to keep private it is probably fine to share on the board with the rest of the group.

    Either way is fine with me. :)

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.