• Resolved svenv

    (@svenv)


    Using the most recent version, trying to add capabilities to a user, or add capabilities to a role, results in a critical error, see below.

    thrown in /var/www/…/htdocs/wp-content/plugins/user-role-edit” while reading response header from upstream, client: 197.237.117.72, server: www…..com, request: “POST /wp-admin/users.php?page=users-user-role-editor.php HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php/php74-fpm-….com.sock:”, host: “www…..com”, referrer: “https://www…..com/wp-admin/users.php?page=users-user-role-editor.php”
    2021/01/11 16:04:09 [error] 27725#27725: *460963 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Call to undefined method URE_Editor::update() in /var/www/….com/htdocs/wp-content/plugins/user-role-editor/includes/classes/editor.php:1203
    Stack trace:
    #0 /var/www/….com/htdocs/wp-content/plugins/user-role-editor/includes/classes/editor.php(1336): URE_Editor->process_user_request()
    #1 /var/www/….com/htdocs/wp-content/plugins/user-role-editor/includes/classes/user-role-editor.php(653): URE_Editor->show()
    #2 /var/www/….com/htdocs/wp-includes/class-wp-hook.php(287): User_Role_Editor->edit_roles()
    #3 /var/www/….com/htdocs/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters()
    #4 /var/www/….com/htdocs/wp-includes/plugin.php(484): WP_Hook->do_action()
    #5 /var/www/….com/htdocs/wp-admin/admin.php(259): do_action()
    #6 /var/www/….com/htdocs/wp-admin/users.php(11): require_once(‘/var/www/……’)
    #7 {main}

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    Thanks for this note. Before click “Update” at User Role Editor force browser page refresh in order to URE uses the latest version of related JavaScript code.

    It should not submit form via POST request which uses older ‘update’ method but send AJAX request without full page refresh.

    Yup! It is a bug in the latest version.

    WordPress-version 5.6
    Nuvarande tema: Twenty Ten (version 3.2)
    Nuvarande tillägg: User Role Editor (version 4.58.1)
    PHP-version 7.4.14

    Uppgifter om felet
    ==================
    Ett fel av typen E_ERROR uppstod på rad 1203 i följande fil: /customers/1/a/e/visborgs.se/httpd.www/wp-content/plugins/user-role-editor/includes/classes/editor.php. Felorsak: Uncaught Error: Call to undefined method URE_Editor::update() in /customers/1/a/e/visborgs.se/httpd.www/wp-content/plugins/user-role-editor/includes/classes/editor.php:1203
    Stack trace:
    #0 /customers/1/a/e/visborgs.se/httpd.www/wp-content/plugins/user-role-editor/includes/classes/editor.php(1336): URE_Editor->process_user_request()
    #1 /customers/1/a/e/visborgs.se/httpd.www/wp-content/plugins/user-role-editor/includes/classes/user-role-editor.php(653): URE_Editor->show()
    #2 /customers/1/a/e/visborgs.se/httpd.www/wp-includes/class-wp-hook.php(287): User_Role_Editor->edit_roles(”)
    #3 /customers/1/a/e/visborgs.se/httpd.www/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
    #4 /customers/1/a/e/visborgs.se/httpd.www/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #5 /customers/1/a/e/visborgs.se/httpd.www/wp-admin/admin.php(259): do_action(‘users_page_user…’)
    #6 /customers/1/a/e/visborgs.se/httpd.www/wp-admin/users.php(11): require_once(‘/customers/1/a/…’)
    #7 {main}
    thrown

    Temporary solution is to install
    User Role by BestWebSoft – 1.6.3

    After updating to the latest version I get a critical error when trying to change user roles. I used WP Roollback to go back to version 4.57.1 and it works fine.

    I have used the plugin for almost 10 years with no issues.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    Thanks for all report about this problem.
    Did you try to force browser page refresh (Ctrl+F5) after opening User Role Editor in order it loads the latest version of JavaScript code instead of using older from the local cache?

    JavaScript part of User Role Editor was refactored. Usage of older version ure.js file leads to the problem described above. I will remove the call of not existed method from the code of course. But really it never should be called except of situation when older ure.js is loaded.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    I’m preparing the update which will load JavaScript parts adding URE plugin version to exclude in future the issues similar to this one.

    Thanks. I did try the forced refresh but it didn’t work for me.

    Thanks in advance for the upcoming update.

    4.58.1
    Bug persisted for me too. I will be using existing permissions in the meantime. Courage to the developer

    Plugin Author Vladimir Garagulya

    (@shinephp)

    Can you try the development version 4.58.2?
    It should not produce the mentioned PHP fatal error. It’s available for download as a development version from this page.

    Btw., if site uses CDN, check if CDN has the latest version of URE JavaScript files (ure.js in this case) too.

    Thread Starter svenv

    (@svenv)

    Hi Vladimir,

    That version fixes the issue, thanks.

    Regards,
    Sven

    Vlad that links takes me to 4.58.1

    Where is the 4.58.2?

    Thanks

    Ignore that I found it. That version works fine. Thanks!

    • This reply was modified 3 years, 3 months ago by tradeshark2.
    Plugin Author Vladimir Garagulya

    (@shinephp)

    Thank a lot for the help with testing the fix.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Can’t change user or role capabilities’ is closed to new replies.