Forum Replies Created
-
AuthorPosts
-
VladimirKeymaster
I never reported WordPress bugs yet. Look at this guide.
I did not find any bug which mention ‘new_role2’.
There will be no problem if you will not find if this bug is reported or not, I think. Moderator will do it, finally.VladimirKeymasterYes, it’s definitely a WordPress bug. Look at wp-admin/network/site-users.php, from line #141:
if ( empty( $editable_roles[ $_REQUEST['new_role'] ] ) ) { wp_die( __( 'Sorry, you are not allowed to give users that role.' ) ); }
But when you click ‘Change’ button from the bottom ‘new_role’ is empty, new role value is sent with ‘new_role2’ parameter. But ‘new_role2’ is never checked.
P.S. I will remove your posts with roles data as unrelated to the subject – data before and after are identical.
VladimirKeymasterThis is a video how it works at my test setup with all plugins deactivated.
It’s definitely not related to URE. I can just suppose that something is wrong with your installation.
You can send to suport [at-sign] role-editor.com a download link to your test installation database backup. I will try to repeat this issue at my local test environment, where I can debug it (if it will be repeated) to isolate a reason. Send me your test wp-config.php also.
VladimirKeymasterIs any other plugin active?
Try do deactivate all plugins. If issue will not be repeated, activate theme back one by one to isolate a conflicting code.VladimirKeymasterI can not repeat this for any role from the list of built-in WordPress roles. I got such error message just for the situation I described above. When I select any role which exists for subsite then user’s role is changed as expected.
Deactivate URE and test. Will you get the same result? If YES, you will get the same error message, then some other plugin or theme can take effect.
VladimirKeymasterAdditional test showed that roles drop-down list opened for any subsite under “Network Admin -> Sites” shows a list of roles from the main site, not all roles from all subsites as I wrote above.
WordPress core does not takes into account here that roles list can be different between subsites. So if roles are not synchronized between subsites you can get such error message.You have to remember that wordpress stores roles for subsites separately for every subsite.
I will look if it’s possible to fix this issue via a suitable hook.
VladimirKeymasterMy test showed that WordPress includes to the roles drop-down list here all roles from all subsites. I just added new role “Main site only” at the main site. Then went to ‘edit’ page of site selected via the “Network admin -> Sites”, and saw that role in drop-down list for subsite. It’s not correct, this is a WordPress bug possibly.
If you try to assign to a user a role from site 1 which does not exist at site B, then you will receive such error message: “Sorry, you are not allowed to give users that role.”. You can not assign to a user not existing (at this subsite) role.VladimirKeymasterHi Jakub,
You can develop locally with User Role Editor Pro. Just do not input/activate a license key there. URE Pro will provide a full functionality except the automatic update via WordPress.
VladimirKeymasterYes, it’s possible:
SELECT user_login, user_email, user_registered FROM wp_users
VladimirKeymasterHi,
User Role Editor exports just a user roles with capabilities. It’s a serialized PHP array additionally encoded.
You can use PhpMyAdmin to export needed data. Use this command at SQL tab:
SELECT user_login, user_email FROM wp_users
replace ‘wp_’ with your own database prefix, if needed.
Then click ‘Export’. Select an option “CSV for MS Excel” and that’s it. You will get a file with data formatted this way:"user1";"[email protected]" "user2";"[email protected]"
VladimirKeymasterEditor is a power user. He can edit any attribute of a published post. It means that he can change its status (as you mentioned), he can change its permalink, he can just remove/replace full content of the post.
So 1st, I would think about stronger selecting of and more trust to so powerful users.There is no built in functionality in WordPress to filter posts statuses list or prevent post status change at the post edit page. If user can publish post he can change its status to one of hard coded at wp-admin/includes/meta-boxes.php, function post_submit_meta_box().
It’s possible to write some code which will make any unpublished post back to the ‘published’ state. But I think that you will not wish to remove from editor this ability in case if he publish some post by mistake and wish return it back to a ‘draft’ or ‘pending’ status.
An example of changing post status after post saving is available here. You can use it as a starting point.
VladimirKeymasterHi,
Revoke from an editor’s role just a ‘delete_publish_posts’, but still grant to it the rest:
‘delete_posts’, ‘delete_others_posts’. This way editor role should be capable to delete draft and pending posts.‘delete_posts’ granted to a ‘contributor’ role allows contributors to delete their own drafts.
VladimirKeymasterIt seems some PHP error takes place.
Try to deactivate all plugins and re-test. If problem will go away, activate plugins back one by one to isolate a problematic one.
It’s possible to turn ON temporally debugging information in order to see what error prevent normal post creation: https://codex.wordpress.org/Debugging_in_WordPress
VladimirKeymasterHi,
Give me more details about what do you try to achieve. Screenshots will be very helpful.
25/02/2017 at 13:42 in reply to: Multisite > Non-admin user, "Other/Additional Roles" keep getting reset #3383VladimirKeymasterHi Shweta,
Try to deactivate temporally all plugins at the main(root) site except URE and test if role will be assigned correctly and will be in place after user login. I suppose that some plugin can reassign subscriber to this user at the root site.
-
AuthorPosts