Custom user role with manage_options cannot access RankMath > Dashboard

#1087019
  • I am creating a custom theme with custom user role that would replace “administrator” for security purposes. I have created role “developer” and added all the capabilities rankmath adds to the database by default. Everything works fine, Except I cannot see subemnu RankMath SEO > Dashboard or access the page directly. User role has needed capabilities (for example manage_options) according to your codebase.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello,

    I apologize for the issue you are facing with accessing the Rank Math Dashboard using your custom user role. It sounds like you’ve done a great job setting up the custom role and assigning capabilities. However, there are a few things you might want to check:

    1. Role Manager Settings: Ensure that the Role Manager feature is enabled in Rank Math. You can do this by navigating to WordPress Dashboard → Rank Math SEO → Dashboard → Modules and enabling the Role Manager module if it’s not already enabled.

    2. User Capabilities: Double-check that your custom role has all the necessary capabilities assigned. In addition to manage_options, make sure that the following capabilities are also included for your custom role:

      • rank_math_dashboard
      • rank_math_options
      • rank_math_role_manager
      • Any other specific capabilities related to Rank Math that might be required.
    3. Access Control: Sometimes, even with the right capabilities, access can be restricted based on other settings or plugins that manage user roles and permissions. Ensure there are no conflicting settings from other plugins that might be affecting access.

    4. Direct Access: If you are trying to access the dashboard directly via URL, ensure that the URL is correct and that your role has been granted access to that specific page through the Role Manager settings.

    If you have checked all of these and are still having issues, please reply to this ticket with your site URL so we can assist you further. A human agent from our support team will take over and provide more detailed assistance.

    Thank you for raising this concern!

    Sources:
    How to Use the Role Manager Feature of Rank Math SEO Plugin

    This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.

    Even thou bots reply was completely incorrrect, I have tried adding capabilities bot mentioned, but to no avail.

    Site is hosted locally, but I can send data as needed.

    Hello,

    Even if you’ve given them all Rank Math permissions via the Role Manager, the Rank Math Dashboard, and other settings require the default WordPress capability manage_options to be visible and accessible.

    Since that role doesn’t include that capability, they won’t be able to see those sections.

    To fix this, you can use a plugin like User Role Editor to add the manage_options capability to their role, without needing to make them a full admin.

    Looking forward to helping you.

    1010 Hosting
    Rank Math free

    Pardon for misunderstanding, but user role “developer” has “manage_options” capability. You can check it here. Its data from db.wp_options “wp_user_roles” meta_field. I have also confirmed in multiple ways user has “manage_options” capability.

    1010 Hosting
    Rank Math free

    For anyone looking at this issue in the future, RankMath asks for “level_1” capability when adding a page, even thou that capability is so deprecated there is nothing about it in WP Codex.

    For support agents, please report a bug.
    Bug is located in /includes/admin/class-admin-menu.php on lines 81, 151, and 239.

    Hello,

    Thank you for your input. We have shared this with our development team for further confirmation. We will let you know if we have more insights about this.

    Don’t hesitate to get in touch with us if you have any other questions.

    Hello,

    Could you please share the code responsible for creating the custom user, you may paste it in the sensitive data area or share a private pastebin https://pastebin.com/.

    We look forward to having this issue resolved.

    Thank you.

    1010 Hosting
    Rank Math free

    Code as code is not an issue. It works flawlessly now that I found out there is a bug in your plugin. As I stated previously, RankMath code asks for “level_1” capability instead of “manage_options” or something else. Capability “level_1” is deprecated and so old that there is nothing about it in the WP Codex. Developer should just update code to a modern capability.

    Mentioned bug in RankMath code is located in /includes/admin/class-admin-menu.php on lines 81, 151, and 239.

    Hello,

    We have logged this issue and a fix will be included in an upcoming release.

    We apologize for any inconveniences that might have been caused as a result of this issue.

    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)

You must be logged in to reply to this ticket.