Change WordPress user roles and capabilities Forums Bug Reports Gravity Forms Restrictions No Longer Working

Tagged: 

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #7864
    epss
    Participant

    I have been using user role editor to restrict users to specific gravity forms. It is no longer working and the users have access to ALL OF THE FORMS. This is a MAJOR issue for us because we have information in forms that can not be shared between users on the site.

    I’m not sure when it stopped working. When I edit a user there are new options to “What to do – Allow, Prohibit, and Look at Roles” Nothing is selected for existing users. I selected What to do: Allow and then had the same list of form ids that was previously working and the user has access to all of the forms on the system. When I select “prohibit” the site reports “There has been a critical error on this website. Please check your site admin email inbox for instructions.” When I select “Look at roles” I can’t tell what it is doing.

    #7865
    epss
    Participant

    Here is the error report the WP sends out when I have the “Prohibit” item checked.

    When seeking help with this issue, you may be asked for some of the following information:
    WordPress version 5.9.2
    Current theme: Beaver Builder Child Theme (version 1.0)
    Current plugin: User Role Editor Pro (version 4.62)
    PHP version 7.4.28

    Error Details
    =============
    An error of type E_ERROR was caused in line 211 of the file /wp-content/plugins/user-role-editor-pro/pro/includes/classes/gf-access-user.php. Error message: Uncaught Error: Call to undefined method URE_GF_Access_User::get_fg_list() in /wp-content/plugins/user-role-editor-pro/pro/includes/classes/gf-access-user.php:211
    Stack trace:
    #0 /wp-content/plugins/user-role-editor-pro/pro/includes/classes/gf-access.php(92): URE_GF_Access_User::get_allowed_forms()
    #1 /wp-content/plugins/user-role-editor-pro/pro/includes/classes/gf-access.php(229): URE_GF_Access->get_allowed_forms()
    #2 /wp-includes/class-wp-hook.php(307): URE_GF_Access->prohibited_links_redirect(”)
    #3 /wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #4 /wp-includes/plugin.php(474): WP_Hook->do_action(Array)
    #5 /wp-admin/admin-header.php(163): do_action(‘admin_head’)
    #6 /wp-admin/admin.php(239): require_once(‘/

    #7866
    epss
    Participant

    When I roll back to user role editor 4.60.2 it works again.

    #7867
    Vladimir
    Keymaster

    Thanks for the notification. Error in line 211 is caused by a typo skipped the tests somehow. Valid method name for call here is URE_GF_Access_User::get_gf_list(). Fixed.

    Related update was introduced with version 4.61 “New: Gravity Forms Edit Access add-on: It’s possible to set what forms is allowed to edit for the selected role.”. It should use “Allow” value by default for not updated user profiles.

    I’m ready to investigate the issue. If it’s possible to get admin access to your site (stage/development copy better) send credentials to support [at-sign] role-editor.com

    #7868
    epss
    Participant

    I have set you up as a user on a development site. You should have the login information in [email protected]

    #7869
    City Dev
    Participant

    I am having the same experience. I can confirm both the issues noted and the solution of downgrading.

    #7870
    Vladimir
    Keymaster

    I confirm the issue. Thank you for the provided information and access/data for testing. I work on the fix.

    #7871
    Vladimir
    Keymaster

    I found and fixed the bug. I will include it to the next update.

    To @epss: I uploaded to dev copy the updated file user-role-editor-pro/pro/includes/classes/gf-access-user.php.

    The begin of get_roles_data() function was replaced from:

    
        private static function get_roles_data( $user_id, $user_what_to_do ) {       
            $all_forms = array();
            $access_data = get_option( URE_GF_Access_Role::ACCESS_DATA_KEY );
            if ( !is_array( $access_data ) ) {
                return $all_forms;
            }        
            $what_to_do = -1;   // Not initialized
     

    to

    
        private static function get_roles_data( $user_id, $user_what_to_do ) {                
            $access_data = get_option( URE_GF_Access_Role::ACCESS_DATA_KEY );
            if ( !is_array( $access_data ) ) {
                $data = array(
                    'what_to_do'=>1,
                    'forms_list'=>array()
            );
                return $data;
            }        
            $all_forms = array();        
            $what_to_do = -1;   // Not initialized
    
    #7875
    Vladimir
    Keymaster

    You may try a beta version 4.62.1.b1. It’s available after login from the “Download” page.

    #7877
    epss
    Participant

    Thanks. From my limited testing, it appears to have resolved both issues.

    #7878
    Vladimir
    Keymaster

    Thanks a lot for the help.

    #7979
    James Smith
    Participant

    I can attest to the problems mentioned as well as the downgrade fix.
    magento 2 development services

    #7983
    epss
    Participant

    I am currently on the most recent version of both User Role Editor (4.62.1) and WP (6.0) with no issues. The fix that Vladimir released in March resolved the issue

    #7994
    Gracie Vaughn
    Participant

    if gaining admin access to your website is possible.
    magento 2 migration service

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.