Change WordPress user roles and capabilities › Forums › Bug Reports › Default WordPress Filters
- This topic has 14 replies, 3 voices, and was last updated 7 years, 2 months ago by Vladimir.
-
AuthorPosts
-
04/10/2016 at 15:55 #2840kdowdleParticipant
Hello,
I’m encountering an issue with URE where I’m unable to use the default WordPress filters in the WP Admin areas.
For example, under the default WordPress Comments area you have the option to filter the comments using the following filters: Pending, Approved, Spam, Trash
I have found that when I am logged in as a user with of my customer URE roles, that none of those filters work. I can click on them, but I am always kicked back out to the WP Admin Dashboard.
I can see that it’s attempting to load the filtered comments (URL = /wp-admin/edit-comments.php?comment_status=moderated)
But I always end up kicked out to the dashboard (URL = /wp-admin/index.php)
When I log in as a full admin user, those default filters work as expected.
Is there a specific Capability that needs to be checked on my custom URE role in order to allow them to use those filters?
Thanks,
Kevin
05/10/2016 at 01:52 #2842VladimirKeymasterHi Kevin,
Such problem may appear when you use “Admin Menu Access” add-on to block some menu items. URE thinks that URL with unknown parameters like ‘comment_status’ are prohibited. There is a workaround for this.
Show me the screenshots what settings you made with “Admin Menu” for the role which is redirected to dashboard when you try to use filtering tabs at the Comments page. I will try to reproduce your situation and recommend a solution.
05/10/2016 at 13:17 #2846kdowdleParticipantHi Vladimir,
Sure thing! Here is an album of three screenshots of the “Admin Menu” settings for the role in question: http://imgur.com/a/1XQDW
Thanks,
Kevin
06/10/2016 at 01:39 #2848VladimirKeymasterHi Kevin,
Thanks for the additional information. I reproduced this issue. It’s the bug.
As we apparently allow just ‘edit-comments.php’ URL under ‘block on not selected’ model URE blocks by default any URLS which differs from ‘edit-comments.php’.I should add ‘comment_status’ to the list of allowed parameters for ‘edit-comments.php’. I will do it with the next update to User Role Editor Pro.
I will let you know when development version with this update will be available for testing. I will try to prepare it until October 10th, 2016.06/10/2016 at 01:51 #2849VladimirKeymasterKevin,
As a quick fix you may replace the file
wp-content/plugins/user-role-editor-pro/pro/includes/classes/admin-menu-url-allowed-args.php
with the file from the zip attached to the message I emailed you directly.Let me know the result when you find a time to test it.
06/10/2016 at 14:37 #2855kdowdleParticipantHi Vladimir,
Thank you so much for the quick response! I intend to test this file this week.
In my testing I noticed another similar issue when trying to filter Posts based on author, for example: /wp-admin/edit.php?post_type=post&author=1234
This also kicks me out to the WP Dashboard. I have the same issue when I try to filter Posts by…
Category: /wp-admin/edit.php?category_name=pre-market
Tag: /wp-admin/edit.php?tag=dow-jonesCould you please include a fix to allow these parameters in your next update as well?
Thanks again,
Kevin
07/10/2016 at 00:44 #2856VladimirKeymasterHi Kevin,
What version of URE Pro do you use?
Parameter author is supported already for URLS like:
edit.php?post_type=post&author=2004
e.g., when we click on the ‘Mine’ tab.Built-in WordPress filter by category uses ‘cat’ parameter, e.g.
edit.php?s&post_status=all&post_type=post&action=-1&m=0&cat=5&filter_action=Filter&paged=1&action2=-1
It works too.Do you use some plugin for posts filtering? Let me know what plugin (download link is appreciated). I will add its parameters to the allowed parameters list.
12/10/2016 at 16:45 #2870kdowdleParticipantHi Vladimir,
We are currently using version 4.27.1 of URE. Could that be why the author parameter isn’t working for me? Would you recommend that I upgrade to 4.28.b1?
Does 4.28.b1 include the fix for the “comment_status” parameter we discussed?
We do not have any plugins in place for post filtering.
Thanks,
Kevin
13/10/2016 at 01:16 #2871VladimirKeymasterHi Kevin,
The latest stable version of URE Pro is 4.28.2. It has less problems with WordPress default filtering and sorting that 4.27.1.
I added ‘comment_status’ parameter to the development version. It (4.29.b7) is available for testing. I plan to publish it as a stable one in 1-2 weeks.Show me a screenshot of the top part of the ‘Posts’ page with ‘filter’ controls. I suppose it differs for the WordPress default one.
13/10/2016 at 14:47 #2872kdowdleParticipantHi Vladimir,
Here’s a screenshot of my Posts admin, specifically the filters: http://i.imgur.com/WySbzpQ.png
I will try upgrading to 4.28.2 to see if this fixes the problem. I’ll let you know how it goes!
Thanks,
Kevin
13/10/2016 at 15:14 #2873kdowdleParticipantHi Vladimir,
Quick update. I just upgraded to 4.28.2 on my dev site and I can confirm that the author parameter now works as expected! The post_status parameter also works.
These other parameters still don’t work though: category_name, tag
Thanks,
Kevin
13/10/2016 at 16:58 #2874VladimirKeymasterHi Kevin,
Thank you very much. Finally I found where WordPress uses “category_name” and “tag” parameters at the ‘Posts’ page. I added it to the list of “allowed” for the development version 4.29.b8 (available for testing).
18/10/2016 at 14:23 #2886kdowdleParticipantHi Vladimir,
Thanks for following up! That’s great news. I’ll test this on our dev site, but I’ll probably wait for the stable update to come out before putting it on our production site.
Thanks again!
Kevin
07/09/2017 at 09:12 #4127sunnyParticipantI found similar issue with TAGS, I am unable to sort the tags on the basis of count. It throws me to the dashboard.
07/09/2017 at 12:51 #4129 -
AuthorPosts
- You must be logged in to reply to this topic.