Change WordPress user roles and capabilities › Forums › Bug Reports › Problem with view-broken-links, search_regex_read and search_regex_write
Tagged: broken link checker
- This topic has 11 replies, 3 voices, and was last updated 6 years, 1 month ago by Vladimir.
-
AuthorPosts
-
24/06/2016 at 18:02 #2436uclaseaswpParticipant
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!
25/06/2016 at 01:49 #2437VladimirKeymasterDid you set any restrictions with “Admin menu access” module for this role? If Yes, describe them or show the screenshots.
27/06/2016 at 17:23 #2440uclaseaswpParticipantNo, 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?
29/06/2016 at 02:32 #2449VladimirKeymasterThere is no ability to attach screeenshots here. Upload them to your own or some public resource and insert links to your post.
29/06/2016 at 02:47 #2450VladimirKeymasterI 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?
29/06/2016 at 17:07 #2455uclaseaswpParticipantHi, 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.
29/06/2016 at 21:45 #2456uclaseaswpParticipantHi, 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.
30/06/2016 at 01:11 #2457VladimirKeymasterHi,
Thanks for letting me know that the issue is resolved.
05/10/2018 at 22:41 #5169jsoundParticipantHi,
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.5I’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,
Joe09/10/2018 at 05:41 #5171VladimirKeymasterTo @jsound:
Hi,Is some menu item from the “Tools menu” selected as “Block selected” at “Admin menu” for this role?
09/10/2018 at 23:49 #5175jsoundParticipantAre 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”.
10/10/2018 at 01:35 #5176VladimirKeymasterNo, 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.
-
AuthorPosts
- You must be logged in to reply to this topic.