Forum Replies Created
-
AuthorPosts
-
Vladimir
KeymasterI suppose a conflict with some other plugin. Try to deactivate all other plugins temporally. Will it help? Then activate them back one by one to isolate a conflicting code.
Then I will try to repeat your issue testing URE with that plugin together.Vladimir
KeymasterTry to deactivate all plugins except User Role Editor to isolate a conflicting one.
I may take a look on-line if you send admin credentials to support [at-sign] role-editor.com
Vladimir
Keymaster“Edit posts restrictions” – “Activate user access management to editing selected posts/pages” at the “Content editing restrictions section”:
Vladimir
KeymasterCheck browser JavaScript console if it has any JavaScript errors. It’s possible that jQuery doesn’t work correctly at user profile for that reason.
As a workaround you can assign a second role to the user via “Capabilities” link under that user at the users list or if you click “Edit” link to the right from the “Capabilities” label.
Vladimir
KeymasterCorrect, every subsite at WP multisite has its own options table db_prefix + blog_id + ‘options’. So we have to make select against every wp_i_options table for every subsite.
uninstall.php is executed inside WP only when you delete plugin at “Plugins” page by click at the ‘Delete’ link. I offered to look at the code to get the idea, where URE stores its data.
Do you see any roles at subsites? Just to check lost you them or no after db prefix change.
I suppose that you have access to “Network admin->Plugins”. So you can network deactivate “User Role Editor Pro”. Click ‘Delete’ under its row after that to fully delete User Role Editor Pro.
1st, try to network deactivate/activate back User Role Editor Pro. Plugin tries to restore its own user capabilities at activation in case they are lost.
Vladimir
KeymasterThe same result I got for the ‘Edit posts restrictions’ add-on: When user was granted 2 roles, where 1st is allowed to edit 1 category, but 2nd is allowed to edit 2 category only, such user is allowed to edit (see at the Posts list) posts from the both categories simultaneously.
Re-check your settings for roles and user and show screenshot if a problem will stay unresolved.
Vladimir
KeymasterHi,
Example below is shown for the default db prefix ‘wp_’.
1st, WordPress core stores user roles with capabilities at wp_options db table at option name ‘wp_user_roles’:
SELECT * FROM wp_options WHERE option_name='wp_user_roles';If db prefix was changed, WP will not find its user roles.
2nd, look at the user-role-editor-pro/uninstall.php
You will see there where URE Pro stores its settings and additional modules data and how to delete theme using SQL tool.It does not prevent access to the Users->User Role Editor menu. It seems you lost user roles, so try to change user roles option_name value using new db prefix.
Vladimir
KeymasterHi,
Just retested ‘Content view restrictions’ add-on: user with 2 roles can view together posts with category 1 allowed for the 1st role and posts with category 2 allowed for the 2nd role.
Vladimir
KeymasterHi,
Do you use “admin menu access” add-on and restrict some menu items for this role?
If ‘Yes’, send me full URL with parameters which was redirected to other menu items after you click search orders button.Vladimir
KeymasterIt seems that you use an older version of Woocommerce. If we look at the latest one, this code looks like:
public function prevent_admin_access() { $prevent_access = false; if ( 'yes' === get_option( 'woocommerce_lock_down_admin', 'yes' ) && ! is_ajax() && basename( $_SERVER["SCRIPT_FILENAME"] ) !== 'admin-post.php' ) { $has_cap = false; $access_caps = array( 'edit_posts', 'manage_woocommerce', 'view_admin_dashboard' ); foreach ( $access_caps as $access_cap ) { if ( current_user_can( $access_cap ) ) { $has_cap = true; break; } } if ( ! $has_cap ) { $prevent_access = true; } } if ( apply_filters( 'woocommerce_prevent_admin_access', $prevent_access ) ) { wp_safe_redirect( wc_get_page_permalink( 'myaccount' ) ); exit; } }You can see that ‘view_admin_dashboard’ was added. This could be the reason why this capability did not work for you. Custom code to add WooCommerce’s ‘woocommerce_prevent_admin_access’ filter is not needed with it. So, in hope that the most of clients use the latest version of WooCommerce, there is no need to add such code to the User Role Editor.
Vladimir
KeymasterStrange. Try to exclude redirection to front-end with this filter (add code to the functions.php file of your active theme):
add_filter('woocommerce_prevent_admin_access', '_wc_prevent_admin_access', 10, 1); function _wc_prevent_admin_access($prevent_admin_access) { return false; }Will it work?
Vladimir
KeymasterHi,
I suppose you use WooCommerce.
Add ‘view_admin_dashboard’ capability to to this role to resolve a redirection to front-end problem. Read this article for more details about it.Vladimir
KeymasterI never saw ‘Delete Site” item at the admin menu. So I suppose that it was added by some plugin. Is it right?
Your assumption about a source of this problem is correct – URE works with admin menu copy from the main site.
There is no ‘delete_sites’ capability. Try to revoke ‘manage_sites’ capability from the role. May be it will help.
Vladimir
KeymasterI missed your message somehow…
Does new added user at subsite has the same role as at the main site?
Did you block WPML with ‘Admin menu’? Does ‘Admin menu’ have the same settings at subsite or do you see any differences?Where do you see ‘Delete site’? I mean does this user has access to the “Network admin -> Sites’ or something else?
Vladimir
KeymasterI sent a version 4.30 to your email. Let me know if you discover any changes critical for you.
-
AuthorPosts