Tagged: 

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #7724
    ysintos
    Participant

    Hello,

    I try to restrict categoy editing from a users group and after pressing the “Posts Edit” i get the error
    Ajax failure
    Internal Server Error

    View post on imgur.com

    The server is working fine in everything else.

    Here is the error i get in NGINX log:

    2021/10/20 16:57:20 [error] 994#994: *25771 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught TypeError: Unsupported operand types: string + string in /home/demo1/public_html/wp-content/plugins/user-role-editor-pro/pro/includes/classes/posts-edit-access-role.php:72
    Stack trace:
    #0 /home/demo1/public_html/wp-content/plugins/user-role-editor-pro/pro/includes/classes/ajax-processor.php(95): URE_Posts_Edit_Access_Role::get_html()
    #1 /home/demo1/public_html/wp-content/plugins/user-role-editor-pro/pro/includes/classes/ajax-processor.php(248): URE_Pro_Ajax_Processor->get_posts_edit_access_data_for_role()
    #2 /home/demo1/public_html/wp-content/plugins/user-role-editor-pro/includes/classes/ajax-processor.php(358): URE_Pro_Ajax_Processor->_dispatch()
    #3 /home/demo1/public_html/wp-content/plugins/user-role-editor-pro/pro/includes/classes/user-role-editor-pro.php(298): URE_Ajax_Processor->dispatch()
    #4 /home/demo1/public_html/wp-includes/class-wp-hook.php(303): User_Role_Editor_Pro->ure_ajax()
    #5 /home/demo1/public_html/wp-includes/class-wp-hook.php(327): WP_Hook” while reading response header from upstream, client: 78.87.217.54, server: demo1.dev2.uoi.gr, request: “POST /wp-admin/admin-ajax.php HTTP/1.1”, upstream: “fastcgi://127.0.0.1:8001”, host: “demo1.dev2.uoi.gr”, referrer: “https://demo1.dev2.uoi.gr/wp-admin/users.php?page=users-user-role-editor-pro.php”

    Any help with it ?

    #7726
    Vladimir
    Keymaster

    Hi,

    Thanks a lot for pointing to this bug. It’s a typo. Quick fix: open post-edit-access-role.php file for editing and replace plus ‘+’ character with this the dot: ‘.’
    Correct version of line #72:

    
    return array('result'=>'success', 'message'=>'Posts edit permissions for role:'. $role_id, 'html'=>$html);
    

    I included this fix to the next release.

    #7727
    ysintos
    Participant

    What i did was, switch to php 7.4 instead of php 8.0.

    #7812
    TrinWeb
    Participant

    We were getting permission rejections when we updated to 8.0.

    People would log in and it would push them to the ‘not allowed’ page wihtout an error message. Had to roll back too.

    #7816
    Vladimir
    Keymaster

    @TrinWEb,
    Can you give more details with problem under PHP 8.0 – error messages at the server log file after switching WordPress to debug mode, browser JavaScript Developer Tools Consol and/or Network panel error messages?

    #8306
    dshank
    Participant

    I’m also getting the “Ajax failure” error when when clicking the “Other Roles” button (after enabling the “Activate Other Roles Access Module”, so I am not able to configure the “Other Roles” checkboxes. I’ve tried in two browsers.

    Can you take a look and let me know what could be wrong?

    #8307
    Vladimir
    Keymaster

    Try in Developer Tools in Google Chrome (F12), select Network tab, click “Other Roles” button at URE, select admin-ajax.php row at the bottom and look at the Response tab for the error message if available.

    #8308
    Vladimir
    Keymaster

    Or send admin credentials to support [at-sign] role-editor.com in order I can look on the issue myself.

    #8324
    dshank
    Participant

    The error in the console is 500, type “xhr”,

    “Initiator”:

    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.2.2

    #8325
    Vladimir
    Keymaster

    It seems as jQuery is not loaded at all, but once you see error message after click on the “Other roles” button, event was assigned to the button via jQuery.

    Is it possible to look at the stage copy of your site to search a reason?

    #8327
    dshank
    Participant

    Yes, how can i send you access details?

    #8328
    Vladimir
    Keymaster

    Send to support [at-sign] role-editor.com

    #8329
    Vladimir
    Keymaster

    @dshank, You have older unsupported version of URE Pro – 4.51.2, which had the bug, caused syntax error:

    [07-Aug-2023 04:22:24 UTC] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string + string in /public_html/wp-content/plugins/user-role-editor-pro/pro/includes/classes/other-roles.php:258

    It was found at have fixed at version 4.57.

    I fixed this bug at your stage server, but recommend to update to the latest version of URE Pro, if you plan to use it.

    #8330
    dshank
    Participant

    Thank you for the follow up. I have just purchased a lifetime license so that I can use the updated versions.

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