Forum Replies Created

Viewing 15 posts - 1,291 through 1,305 (of 2,518 total)
  • Author
    Posts
  • Vladimir
    Keymaster

    I got the file and isolated the issue. The error message is returned for the ‘1’ capability.
    There is a strict type checking at the URE code:

    
     if ($key!==$sanitized_key) {
    

    But $key contains an integer 1, but $sanitized_key contains string ‘1’. So check is failed and returns error.

    I see ‘1’ capability from time to time at different client sites, but still did not have information what plugin can add it. Try to revoke it from all roles to which it is granted. Then delete this capability as unused. Export roles again. This problem with import should gone away.

    Thanks for pointing me on this issue. I will enhance a code here.

    Vladimir
    Keymaster

    Send exported .dat file which you can not import to support [at-sign] role-editor.com
    I will test it and try to understand what is going wrong.

    Vladimir
    Keymaster

    When you can not revoke some user capability from a role, you can block unneeded admin menu items, with “Admin menu access” add-on.

    Vladimir
    Keymaster

    Alphanumeric characters, dashes, underscores, spaces and slashes are allowed by default in user capability ID by default. This PHP regular expression is used: /[^a-zA-Z0-9_\-\s\/]/

    Look if you have capability with 1 inside but containing not allowed characters. Let me know what it is.

    I work on the export/import procedure upgrade. I will add the same filter to the export code in order do not generate this error if some existing capability does not go via this check.

    Vladimir
    Keymaster

    Hi,

    Excellent.

    Just in case someone will have the same question the answer is available hear. It’s included also into readme.txt from installation package .zip file.

    Vladimir
    Keymaster

    Thanks for the feedback.

    “Posts/Pages Editor Restrictions” section is available at user profile for those users only who can edit posts. It’s also hidden if user has ‘administrator’ role.

    Vladimir
    Keymaster

    Hi Levent,

    Deactivate/activate back User Role Editor. It should fix a problem with access of user with ‘administrator’ role to URE Pro.

    Send exported .dat file to support [at-sign] role-editor.com
    I will test it and look what goes wrong.

    in reply to: Read only custom post type #4541
    Vladimir
    Keymaster

    Hi,

    In general if you will not grant to a role any user capability which allow to edit/delete custom post type, such user can view this custom post type records at the front-end.

    If you wish that user sees CPT records list at the back-end, you can turn ON “Activate “Create” capability for posts/pages/custom post types” option at “Settings->User Role Editor->Additional Modules” tab and grant to this role ‘edit_cpt’ (like edit_posts or edit_books) capability only. Then user will see CPT list, with the single action link under each record – “View”.

    Vladimir
    Keymaster

    Hi Cinzia,

    Yes, it’s related to the PHP version.
    Workaround: replace noted line 364 with this code:

    
    if (is_array($caps) & count($caps)>0) {
        $caps_val = array_values($caps);
        $cap = $caps_val[0];
    } else {
        $cap = $caps;
    }
    

    I will include this change to the next update.

    Pay a serious attention that even version 5.5 does not receive the security updates already: http://php.net/supported-versions.php

    in reply to: Create new Role – no dashboard access #4535
    Vladimir
    Keymaster

    Hi Chris,

    Be aware that editing plugins source files is not a good practice. All changes will be lost after the next plugin update. And you will have to make the same changes again.

    The better solution is to edit your child theme functions.php file only:

    
    add_filter('woocommerce_disable_admin_bar', '_wc_disable_admin_bar', 10, 1);
     
    function _wc_disable_admin_bar($prevent_admin_access) {
        if (!current_user_can('see_admin_toolbar')) {
            return $prevent_admin_access;
        }
        return false;
    }
    
    in reply to: Remove capability of Post Types Order plugin #4534
    Vladimir
    Keymaster

    Hi,

    “Settings->Post Types Order” is always protected by ‘manage_options’ capability.
    There is the “Minimum level to use this plugin” options at the “Settings->Post Types Order” page.
    ‘Re-order’ menu item under “Posts”, “Pages” or “Custom post type” menus is protected depending from the choice made in the drop-down menu for the option above:
    Administrator – manage_options
    Editor – publish_pages
    Author – publish_posts,
    etc.

    So you if did not grant ‘manage_options’, ‘publish_pages’, ‘publish_posts’ to your role and select ‘Administrator’, ‘Editor’ or “Author” for minimum level of access to “Post Types Order” (PTO) plugin users with your role should not see the options related to PTO plugin functionality.

    in reply to: Create new Role – no dashboard access #4530
    Vladimir
    Keymaster

    Hi Chris!

    It could be related to some other plugin.
    One possible source of a problem is WooCommerse: https://role-editor.com/woocommerce-admin-bar-access/
    Try to deactivate WooCommerce temporally and re-test.

    in reply to: Create new Role – no dashboard access #4528
    Vladimir
    Keymaster

    Hi Chris,

    Thanks for letting me know that you resolved a problem.

    in reply to: Can't edit existing posts as set user #4524
    Vladimir
    Keymaster

    Some plugin may prevent posts editing. Try to deactivate all plugins and re-test. Then activate plugins back one by one to isolate a conflict.

    Vladimir
    Keymaster

    Hi,

    Generally, a role with just 21 capabilities: read, view_admin_dashboard and all 18 caps from the “Custom Post Types->Coupons” group provides access for working with WooCommerce coupons and adding a new coupon:
    add new coupon
    coupons access list

    Try to deactivate all plugins and re-test. If some plugin prevents creating a new coupon, activate plugins back one by one to isolate a conflict.

Viewing 15 posts - 1,291 through 1,305 (of 2,518 total)