Change WordPress user roles and capabilities › Forums › Bug Reports › Default post category affected by individual user category/taxonomy ID settings
- This topic has 3 replies, 2 voices, and was last updated 6 years, 8 months ago by Vladimir.
-
AuthorPosts
-
28/02/2018 at 21:15 #4634City DevParticipant
When providing category/taxonomy IDs for an individual user, the first ID in the list becomes checked by default when a user creates a new post. The expected functionality is that no categories/taxonomies would be selected by default.
I haven’t attempted the standard troubleshooting techniques to see if any other plugins contribute to the the problem. On first look, my assumption is that it’s isolated to URE.
01/03/2018 at 03:41 #4635VladimirKeymasterRight, URE’s edit restrictions add-on works this way by design. I have a strong reason for this behavior, not one expected by you.
When you input category ID to the user profile such user is allowed to edit just post with that category ID. When user adds new post WordPress added a new post record and then re-open it for editing as the existing post. If this post will not have at least one category from the list of allowed for this user, user will not can to proceed with new added post due to edit restrictions applied to him.
URE assigns to the new added post the 1st category from the list of allowed categories automatically exactly for the reason described above.
01/03/2018 at 15:21 #4637City DevParticipantIf WordPress auto-selected a category as part of it’s typical behavior, this would have gone unnoticed. The fact that it isn’t normal behavior is what made it present as a bug.
Requiring a category ID that the user has permission to edit makes sense. However, a user can still lose access to the post by deselecting the default category and then saving/publishing. The post then uses the default category set in WordPress settings. If the user doesn’t have access to the default WordPress category, then they are unable to edit the post they just created.
I’m not sure what all you’re able to control in the WordPress admin. At a minimum, requiring the default category be assigned based on the users settings would seem necessary to make this approach work without a user being able to circumvent it. To me, a more user friendly approach would be to disable the publish/draft buttons with a small note indicating that selecting a category is required.
02/03/2018 at 05:49 #4643VladimirKeymasterWhile I may agree with you thoughts about user experience, I do not see currently the alternative to auto assign category to a new post created by a restricted user.
Ability to select a default category from the list of allowed categories sounds good for me. Thank for the suggestion. I will take this into account. -
AuthorPosts
- You must be logged in to reply to this topic.