Forum Replies Created
-
AuthorPosts
-
Vladimir
KeymasterJawad,
Quick fix is open includes/pro/classes/meta-boxes.php file and replace 11 priority at lines 26,27,28 to the 99, like this
add_action('add_meta_boxes', array($this, 'remove_blocked_metaboxes'), 99); add_action('wp_dashboard_setup', array($this, 'remove_blocked_metaboxes'), 99); add_action('wp_user_dashboard_setup', array($this, 'remove_blocked_metaboxes'), 99);
As I discovered WooCommerce added its metaboxes with 20 and 30 priorities. So we should use higher priority to remove them later than they were added.
Vladimir
KeymasterJawad,
Please ignore my ask to send me debug information about meta boxes. I found that post edit page (including one belongs to WooCommerce) may contain an empty meta box data. I will update URE’s code for this case.
Vladimir
KeymasterWhen you said ‘Edit posts restrictions’ did you mean
I meant this add-on activated and its settings made at user profile:
Notice: Undefined index: id in /wp-content/plugins/user-role-editor-pro/includes/pro/classes/meta-boxes.php on line 46
It’s not error, just notice. If you set WP_DEBUG to false at wp-config.php file, this message will not be shown.
I can not repeat this. Every meta box should have ID. URE goes through the full list of meta boxes available at this page here. So you have some strange metabox.You may help if you open includes/pro/classes/meta-boxes.php file and insert at line 39:
var_dump($wp_meta_boxes); die;
Open ‘Add Order’ page, copy output and send it to support [at-sign] role-editor.com
Then remove this debug code.if I enable ‘delete_product’ should I also enable ‘delete_products’
I wrote above that it’s not required to include meta capability like ‘delete_product’ directly to the role. It’s enough ‘delete_products’. But WooCommerce does this for its own roles, like ‘Shop Manager’. So repeat it too, include both.
Vladimir
KeymasterJawad,
1) Check if there are no any restrictions set for this user at his ‘Edit posts restrictions’ section.
2) ‘edit_post’, ‘delete_post’ are so called meta capabilities which are mapped by WordPress to the real user capabilities ‘edit_posts’, ‘edit_others_posts’, etc.
For example you check if user can edit the post. If it’s his post, it’s enough to have ‘edit_posts’. Then if this post is published, it’s needed to have ‘edit_published_posts’.
That is for 1 ‘edit_post’ meta capability 2 real capabilities are required. In case user is not an author of this post, WordPress will check if user has ‘edit_others_posts’, etc.
Look at
wp-includes/capabilities.php map_meta_cap()
function for more details.There is no need to add meta capabilities directly to the roles by my opinion. But WooCommerce makes this.
Vladimir
KeymasterAbout blocking admin notices:
Vladimir
KeymasterYes, ‘edit_shop_orders’ is a required one.
Vladimir
Keymaster1) Admin notices – not so fast. I’m working on the answer currently.
2) You may turn ON this option ‘Activate “Create” capability for posts/pages/custom post types”. ‘create_posts’, ‘create_pages’, ‘create_products’ capabilities will be appear in the User Role Editor. Add them to the roles which should add posts, pages, products and other registered custom post types. Role without ‘create_products’ capability will can not add new product – just edit the existing one.
Vladimir
KeymasterJawad,
I understood now.
It’s a products list page. Screen options here are not related to the meta boxes. These options are table columns. It’s not possible to hide them with current version of URE currently. I will look what it’s possible to do with it.Vladimir
KeymasterHi,
Did you open Meta Boxes after you visited this ‘edit product’ page?
Vladimir
KeymasterHi,
1st way: Create a copy of instructor role with admin bar not hidden and assign it to this special user instead of ‘instructor’ role.
2nd way: do not hide admin bar for the instructor role. Create separate empty role with admin bar hidden and add it to the users with instructor role.
Vladimir
KeymasterHi Jawad,
Thanks for the good feedback.
You may use “Meta boxes access” add-on:
Do not forget “to show available meta boxes” to this add-on 1st – visit ‘Dashboard’ page in order add-on may see what meta boxes are currently available.Vladimir
KeymasterThanks for the information.
User Role Editor allows to see ‘Administrator’ role in the roles drop-down list under WordPress multisite in 2 cases:
1) user has ‘manage_network_users’ capability.
But this gives to a user access to the “Network Admin -> Users”.
2)ure_supress_administrators_protection
filter returns true.
In this case be careful, as non-admin users with ‘list_users’, ‘edit_users’ capabilities will can to edit users with ‘Administrator’ role and create other users with ‘Administrator’ role. So use this filter just in case you do not plan to have such users at your site.Vladimir
KeymasterDoes your test user has ‘Administrator’ role at this single site or you assigned him some custom role?
Vladimir
KeymasterWordPress does not store user password at the database. It stores just a password hash value. So it’s not possible to get user password in its original not encrypted form from the database. You should catch a password value earlier, when you change it.
Vladimir
Keymaster… An issue was resolved by e-mail.
-
AuthorPosts