Change WordPress user roles and capabilities Forums Bug Reports Problem with view-broken-links, search_regex_read and search_regex_write

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2436
    uclaseaswp
    Participant

    The problem I’m going to describe did not happen when I was using version 4.24.6. I’m using version 4.25.1 now. I use https://wordpress.org/plugins/search-regex, which comes with search_regex_read and search_regex_write capabilities and https://wordpress.org/plugins/broken-link-checker, which comes with view-broken-links capability. I have a role that includes the view-broken-links, search_regex_read and search_regex_write capabilities. As a user assigned to this role, I cannot access https://dev.engineering.ucla.edu/wp-admin/tools.php?page=view-broken-links and https://dev.engineering.ucla.edu/wp-admin/tools.php?page=search-regex.php. Also, as a user assigned to this role, I have access to see and navigate to Dashboard > Tools > Search Regex and Dashboard > Tools > Broken Links, but the navigation to those features resulted in page not found. All these were working in version 4.24.6. Thank you!

    #2437
    Vladimir
    Keymaster

    Did you set any restrictions with “Admin menu access” module for this role? If Yes, describe them or show the screenshots.

    #2440
    uclaseaswp
    Participant

    No, I did not restrict anything in the Admin Menu. Please see that attached screenshots. Note that I tried giving all capabilities to this role already, but that still did not work (of course in production, I cannot give all capabilities). How can I attach images here for the screenshots?

    #2449
    Vladimir
    Keymaster

    There is no ability to attach screeenshots here. Upload them to your own or some public resource and insert links to your post.

    #2450
    Vladimir
    Keymaster

    I tested ‘Search-regex’ plugin for non-admin user with ‘search_regex_read’ capability in a role without problem.

    ‘Broken Links Checker’ plugin uses ‘edit_others_posts’ capability for its menu item under the ‘Tools’ menu. Does your role include ‘edit_others_posts’ capability?

    #2455
    uclaseaswp
    Participant

    Hi, I think I know what’s happening. I have 2 roles: custom_page and custom_news. See http://www.seas.ucla.edu/temp/user_role_editor/custom_page_role.png and http://www.seas.ucla.edu/temp/user_role_editor/custom_news_role.png. This is because some users can only edit pages and some can only edit posts (for news). If I give a user just custom_page, there is no problem with viewing Tools > Search Regex and Tools > Broken Links. However, as soon as I add another role custom_news to the same user, I can no longer access the pages referenced by viewing Tools > Search Regex and Tools > Broken Links even though my combined capabilities is shown at http://www.seas.ucla.edu/temp/user_role_editor/combined_page_news_roles.png. As soon as I remove custom_news, everything works again. Can you try this and see what conflict did custom_news introduced? Thanks.

    #2456
    uclaseaswp
    Participant

    Hi, I figured it out. The conflict between custom_page and custom_news is that the Admin Menu of custom_news had Available Tools blocked under Tools, while the Admin Menu of custom_page does not even list Tools. This is resolved.

    #2457
    Vladimir
    Keymaster

    Hi,

    Thanks for letting me know that the issue is resolved.

    #5169
    jsound
    Participant

    Hi,
    I’ve been searching the forum for something similar to my issue and this is the closest.
    I’m using WordPress 4.9.8
    User Role Editor Pro 4.41
    Broken Link Checker 1.11.5

    I’ve setup a role that I gave access to the Broken Link through the admin menu block “selected”. I’m able to see the first page, but when I click on the arrow or page 2, it redirects me to the admin homepage. I’ve enabled the user capability edit_others_posts, but no luck. Any assistance would be greatly appreciated.

    Thanks,
    Joe

    #5171
    Vladimir
    Keymaster

    To @jsound:
    Hi,

    Is some menu item from the “Tools menu” selected as “Block selected” at “Admin menu” for this role?

    #5175
    jsound
    Participant

    Are saying all my roles should have the “Admin Menu” set to “Block Selected” instead of “Block Not Selected”? For the specific role that I’m working with, the admin menu is set to “Block Selected”.

    #5176
    Vladimir
    Keymaster

    No, I do not say this. You just have to know that “Block not Selected” model is more restrictive and may require some additional tuning. Read this part of the documentation article for more details.

    All items of the “Tools” submenu use the same command in URL: tools.php and differs just by URL arguments. Thus it requires to “white list” additional parameters not included into menu item URL by default, like filter or page number for the “Broken Links” page even for the “Block Selected” model.

    Unfortunately current URE version missed support of URL arguments white list for the “Tools” menu. Thanks for pointing me to that. I will develop a fix and publish it this month.

    Currently you can try a workaround: use “Block Selected” model and temporally do not block any item under the “Tools” menu.

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.