Skip to content

Fix author visibility issue in the editor. #62575

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

Conversation

rohitmathur-7
Copy link
Contributor

What?

Fixed the Author Visibility issue by displaying the alphabetically first author's name when the post/page is created by a super admin that does not have their user registered in the sub-site.
Fixes the issue: #62574

Why?

There is a UI issue if we are not able to see any author's name. It fixes that.

How?

When a super admin adds a new post/page and its user is not registered on the sub-site, then instead of showing nothing for the author I have added the name of the alphabetically first author's name.

Testing Instructions

  • Login to your WordPress site using a Super admin user.
  • Go on a sub-site where the Super admin user you are using does not have its user registered.
  • Open a new post or page.
  • Check the author in the right panel of the editor.

Screenshots or screencast

author-fix Screenshot 2024-06-14 at 4 16 26 PM

…ame of the alphabetically first author in the Author's name when that field is empty
Copy link

github-actions bot commented Jun 14, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @rohitmathur-7.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: rohitmathur-7.

Co-authored-by: t-hamano <wildworks@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Jun 14, 2024
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @rohitmathur-7! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@rohitmathur-7 rohitmathur-7 changed the title Fix author visibility issue in the posts editor. Fix author visibility issue in the editor. Jun 14, 2024
@t-hamano t-hamano added REST API Interaction Related to REST API [Package] Editor /packages/editor labels Jun 14, 2024
Copy link

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core.
  • Labels found: REST API Interaction, [Package] Editor, First-time Contributor.

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@t-hamano t-hamano self-requested a review June 14, 2024 13:09
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

then instead of showing nothing for the author I have added the name of the alphabetically first author's name.

I think this might be confusing because it shows a user who isn't the actual user who created the post (super admin).

I'd like to suggest an alternative approach. See the comment here for more details.

@rohitmathur-7
Copy link
Contributor Author

Thanks for the PR!

then instead of showing nothing for the author I have added the name of the alphabetically first author's name.

I think this might be confusing because it shows a user who isn't the actual user who created the post (super admin).

I'd like to suggest an alternative approach. See the comment here for more details.

Sorry I just saw the comment on the PR now, and I added the name of the alphabetically first author's name because in the previous versions if a super admin created a post then it showed alphabetically first author's name as the author, so to maintain consistency I did the same.

@t-hamano
Copy link
Contributor

because in the previous versions if a super admin created a post then it showed alphabetically first author's name as the author

Oh, I didn't know that. Do you know in which version of WordPress this issue first occurred?

@rohitmathur-7
Copy link
Contributor Author

because in the previous versions if a super admin created a post then it showed alphabetically first author's name as the author

Oh, I didn't know that. Do you know in which version of WordPress this issue first occurred?

No I don't have idea in which WordPress version this first occurred.

@t-hamano
Copy link
Contributor

Sorry for the late reply.

To fundamentally solve this problem, I think some kind of work needs to be done on the core side. See this comment for details.

@Mamaduka
Copy link
Member

Mamaduka commented Aug 5, 2025

Closing as not applicable. Displaying the first author instead of the actual post author is misleading.

As noted in discussion this requires resolution on the REST API side.

@Mamaduka Mamaduka closed this Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Package] Editor /packages/editor REST API Interaction Related to REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants