Change WordPress user roles and capabilities › Forums › Bug Reports › Ajax Failure
Tagged: Ajax failure
- This topic has 13 replies, 4 voices, and was last updated 1 year, 3 months ago by dshank.
-
AuthorPosts
-
20/10/2021 at 13:52 #7724ysintosParticipant
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 ErrorThe 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 ?
21/10/2021 at 04:40 #7726VladimirKeymasterHi,
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.
21/10/2021 at 05:42 #7727ysintosParticipantWhat i did was, switch to php 7.4 instead of php 8.0.
31/01/2022 at 18:42 #7812TrinWebParticipantWe 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.
01/02/2022 at 04:39 #7816VladimirKeymaster@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?17/07/2023 at 18:53 #8306dshankParticipantI’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?
18/07/2023 at 03:41 #8307VladimirKeymasterTry 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.
18/07/2023 at 03:42 #8308VladimirKeymasterOr send admin credentials to support [at-sign] role-editor.com in order I can look on the issue myself.
02/08/2023 at 01:00 #8324dshankParticipantThe 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
02/08/2023 at 04:33 #8325VladimirKeymasterIt 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?
03/08/2023 at 23:29 #8327dshankParticipantYes, how can i send you access details?
04/08/2023 at 02:26 #8328VladimirKeymasterSend to support [at-sign] role-editor.com
07/08/2023 at 04:39 #8329VladimirKeymaster@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.
07/08/2023 at 18:29 #8330dshankParticipantThank you for the follow up. I have just purchased a lifetime license so that I can use the updated versions.
-
AuthorPosts
- You must be logged in to reply to this topic.