Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback - "Learn WordPress Website Post Author Selection Error" #2227

Closed
devmuhib009 opened this issue Feb 19, 2024 · 29 comments
Closed

Feedback - "Learn WordPress Website Post Author Selection Error" #2227

devmuhib009 opened this issue Feb 19, 2024 · 29 comments
Assignees
Labels
[Component] Learn Plugin Website development issues related to the Learn plugin.

Comments

@devmuhib009
Copy link
Member

Type of feedback

Tutorial Custom Post Type Author Assignment Not Working.

Description

I've added a new user to learn WordPress website. When I try to assign him on Tutorial custom post type, I can't find him on author list. We already discussed this on #meta-learn channel. Here is the link.

Step-by-step reproduction instructions (optional)

Screenshots or screen recording (optional)

Other information (optional)

@devmuhib009 devmuhib009 added the Awaiting Triage Issues awaiting triage. See Training Team handbook for how to triage issues. label Feb 19, 2024
@jonathanbossenger jonathanbossenger added [Component] Learn Plugin Website development issues related to the Learn plugin. and removed Awaiting Triage Issues awaiting triage. See Training Team handbook for how to triage issues. labels Feb 19, 2024
@jonathanbossenger
Copy link
Collaborator

@bsanevans @devmuhib009 I think what we are hitting here is a hard limit on the number of authors that are displayed in the Author select box for a tutorial.

If you look at the authors there, it's an alphabetical list of 50, ending around H. For example, myself and Wes are also not on that list, even though we are Admins.

We might need to either a) do some pruning of users that have access to add/edit tutorials or b) see if we can increase that limit.

@pkevan do you know if there is a limit on returning only 50 users in the Author select box for the Post edit view on .org sites? I did a quick scan on the wporg-learn plugin and didn't find anything there.

@pkevan
Copy link
Contributor

pkevan commented Feb 21, 2024

@pkevan do you know if there is a limit on returning only 50 users in the Author select box for the Post edit view on .org sites? I did a quick scan on the wporg-learn plugin and didn't find anything there.

This seems like it may be related to something else (Gutenberg plugin perhaps?), since I can reproduce the same behaviour on a make.wordpress.org site.

@jonathanbossenger
Copy link
Collaborator

@pkevan got it, thanks. I will test with a local "vanilla" site to be sure.

@pkevan
Copy link
Contributor

pkevan commented Feb 21, 2024

Actually, I think this might be by design - list only the first 50 users, as the author box is designed for search.

I've tested this on several different sites, and it appears consistent.

@jonathanbossenger
Copy link
Collaborator

Ah, got it. Time to inspect the REST request...

@jonathanbossenger
Copy link
Collaborator

@pkevan while we are diving into a possible fix, are you perhaps able to manually assign the user to the post via the database?

@pkevan
Copy link
Contributor

pkevan commented Feb 22, 2024

Something strange is going on - i'll continue to investigate before manually changing something directly in the DB and potentially causing more problems!

@jonathanbossenger
Copy link
Collaborator

Thank you.

@pkevan
Copy link
Contributor

pkevan commented Feb 22, 2024

I couldn't figure out why the user wasn't appearing in the search, but have manually assigned it via WP CLI, so there shouldn't be any issues with anything not being updated correctly.

@devmuhib009
Copy link
Member Author

Thanks @pkevan for adding him. Prem Tiwari is working on 2 more issues. I will draft those posts soon. I just wanted to test if I can assign him for new posts. But unfortunately its not working. I will tell you when I create those posts, so you can assign him with cli again.

@pkevan
Copy link
Contributor

pkevan commented Feb 22, 2024

Probably easier to have Prem create the posts, rather than have this as a work-around.

@devmuhib009
Copy link
Member Author

That might be a good solution, but with a contributor role he can't create Tutorial posts. If we make him editor or author then he will able to create and publish posts himself. But we need to check his post quality before it goes live. Thus we can't assign a higher role at initial stage.

I am a faculty in training team. Is this possible, can I assign him with cli? I have very few knowledge on it. If you can share any resource, it will be much appreciated.

@pkevan
Copy link
Contributor

pkevan commented Feb 22, 2024

Prem has an author user role, so should be able to create but not publish posts - if that's not the case then it should probably be investigated as a different issue.

@pkevan
Copy link
Contributor

pkevan commented Feb 22, 2024

CLI access is limited to those with sandbox across all of wp.org (of which there aren't many) so that wouldn't be possible.

@devmuhib009
Copy link
Member Author

Ok, I will keep your advices in mind and inform you if any difficulties arises.

@jonathanbossenger
Copy link
Collaborator

Prem has an author user role, so should be able to create but not publish posts - if that's not the case then it should probably be investigated as a different issue.

I'm not sure this is 100% correct, I just logged in with a test user that is an Author, and it looks like I can hit publish, or at least, the Publish button is available to me.

Give me a few minutes while I test the other roles.

@jonathanbossenger
Copy link
Collaborator

It looks like the contributor can also Publish, (again the Publish button is available, I'm not checking that I can publish because I don't want to actually publish something incorrectly).

@devmuhib009 I think we need to raise this with the training team faculty and see if we can determine a way around this while we look into the issue. Even if we just leave it assigned to someone else for now, and update it once it's fixed.

@devmuhib009
Copy link
Member Author

@jonathanbossenger, Though publish button is available, contributors can't publish the post. When they click on publish button, nothing happens actually. I am not sure about author role.

@pkevan
Copy link
Contributor

pkevan commented Feb 22, 2024

Prem has an author user role, so should be able to create but not publish posts - if that's not the case then it should probably be investigated as a different issue.

I got confused here - an author can publish their own posts.

@jonathanbossenger
Copy link
Collaborator

Though publish button is available, contributors can't publish the post. When they click on publish button, nothing happens actually. I am not sure about author role.

Ah, thanks @devmuhib009 I was not aware of that. That means if we make Prem a Contributor, that will solve the problem, no? Or can he still not create posts?

@devmuhib009
Copy link
Member Author

@jonathanbossenger what I've observed, contributor users can not create Tutorial posts. When an admin assign on a Tutorial, then they are allowed to edit that specific post only. Where I am stuck, when I search his username to assign, I do not see him in the list. 😀

@jonathanbossenger
Copy link
Collaborator

@devmuhib009 I just tested with a test user I have, with the contributor role, and that user was able to create a Tutorial post - https://learn.wordpress.org/wp-admin/post.php?post=83588&action=edit

@devmuhib009
Copy link
Member Author

Ok, do you try to publish as well? If the publish option do not work for them, then we can tell them to create their posts themselves and we can publish as admin.

@jonathanbossenger
Copy link
Collaborator

@devmuhib009 I did not, because of what you had said

Though publish button is available, contributors can't publish the post. When they click on publish button, nothing happens actually.

@devmuhib009
Copy link
Member Author

I found a solution. I said the contributor to draft the post himself and then I am helping him. This way I am working now.

@jonathanbossenger
Copy link
Collaborator

OK cool.

@bsanevans I think this is probably the way we should move forward on this.

  • Assign the contributor role
  • Ask the contributor to create the post
  • Admins can publish the post once we're happy with the content.

I've had a similar issue when I was trying to add members to the course cohort, sometimes the user search doesn't work 100% as expected.

What I suggest we do is close this issue, and I'll open a new more focused ticket on the user search endpoint, with some example requests and their results.

@kaitohm
Copy link
Contributor

kaitohm commented Mar 2, 2024

Thank you for all the testing folks did here 🙇‍♂️

@jonathanbossenger Team Reps got confirmation from the team last year to demote contributors who have been inactive for more than 6 months. We never acted on that, though. I'll bring it up with team reps to do a sweep once, as this may help with the issue raised here.

Separately, sure. Let me update the handbook next week, directing contributors to create posts themselves. This should be just a temporary workaround until we have the translation plugin installed on Learn.

@jonathanbossenger
Copy link
Collaborator

Thanks @bsanevans

Closing this out now, but feel free re-open it if it becomes a deeper problem.

@kaitohm
Copy link
Contributor

kaitohm commented Mar 8, 2024

Just noting I've updated the handbook page below, explaining what to do when a contributor cannot be found in the author field. I opted to make this addition, rather than updating the process in multiple pages, as this entire process will change again once the translation management plugin is activated on the site.

https://make.wordpress.org/training/handbook/training-team-how-to-guides/content-localization/adding-users-and-content-to-learn-wordpress/#adding-a-content-translator-to-learn-wordpress-and-assigning-them-content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Learn Plugin Website development issues related to the Learn plugin.
Projects
Status: Done
Development

No branches or pull requests

4 participants