Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5536
    armel
    Participant

    Hello,

    I receive the bug below after using other role access addon for multisite

    Fatal error: Uncaught Error: Call to undefined method URE_Lib_Pro::set_notification() in /wp-content/plugins/user-role-editor-pro/pro/includes/classes/other-roles-access.php:109
    Stack trace:
    #0 /wp-includes/class-wp-hook.php(286): URE_Other_Roles_Access->update_data(”)
    #1 /wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #2 /wp-includes/plugin.php(465): WP_Hook->do_action(Array)
    #3 /wp-content/plugins/user-role-editor-pro/includes/classes/editor.php(1137): do_action(‘ure_process_use…’)
    #4 /wp-content/plugins/user-role-editor-pro/includes/classes/editor.php(1265): URE_Editor->process_user_request() #5 /wp-content/plugins/user-role-editor-pro/includes/classes/user-role-editor.php(645): URE_Editor->show()
    #6 /wp-includes/class-wp-hook.php(286): User_Role_Editor->edit_roles(”) #7 /wp-content/plugins/user-role-editor-pro/pro/includes/classes/other-roles-access.php on line 109

    #5537
    Vladimir
    Keymaster

    Hi,

    Thanks for this bug report. I confirm it. I will include a fix into upcoming version 4.50.1. I will publish it in a few days, just in case some other bugs will be discovered. Until that, it will be available as beta version 4.50.1.b1.

    Quick fix – replace URE_Other_Role_Access::update_data() method with this version:

    
        public function update_data() {
        
            if (!isset($_POST['action']) || $_POST['action']!=='ure_update_other_roles_access') {
                return;
            }
            
            $editor = URE_Editor::get_instance();
            if (!current_user_can(self::OTHER_ROLES_ACCESS_CAP)) {
                $editor->set_notification( esc_html__('URE: you have not enough permissions to use this add-on.', 'user-role-editor') );
                return;
            }
            $ure_object_type = filter_input(INPUT_POST, 'ure_object_type', FILTER_SANITIZE_STRING);
            if ($ure_object_type!=='role' && $ure_object_type!=='user') {
                $editor->set_notification( esc_html__('URE: other roles access: Wrong object type. Data was not updated.', 'user-role-editor') );
                return;
            }
            $ure_object_name = filter_input(INPUT_POST, 'ure_object_name', FILTER_SANITIZE_STRING);
            if (empty($ure_object_name)) {
                $editor->set_notification( esc_html__('URE: other roles access: Empty object name. Data was not updated', 'user-role-editor') );
                return;
            }
                            
            if ($ure_object_type=='role') {
                $this->objects->save_access_data_for_role($ure_object_name);
            } else {
                $this->objects->save_access_data_for_user($ure_object_name);
            }
            
            $editor->set_notification( esc_html__('Other roles access data was updated successfully', 'user-role-editor') );
            
        }
        // end of update_data()
    
    #5538
    armel
    Participant

    Ok, thanks.

    #5540
    Vladimir
    Keymaster

    I published version 4.50.1 just now be cause of other bug report – Front-end menu access add-on was not loaded due to it. Both bugs were fixed at 4.50.1 release.

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