Skip to content

Fixed report/block user hidden for valid WordPress.com authors#22594

Open
annaharri89 wants to merge 2 commits intowordpress-mobile:trunkfrom
annaharri89:issue/report-block-user-missing
Open

Fixed report/block user hidden for valid WordPress.com authors#22594
annaharri89 wants to merge 2 commits intowordpress-mobile:trunkfrom
annaharri89:issue/report-block-user-missing

Conversation

@annaharri89
Copy link

@annaharri89 annaharri89 commented Feb 13, 2026

Description

Fixes #21144

  • The isSelfHosted check used ‘authorBlogId’ (author's site ID) which is -1 for authors without their own site but didn’t account for self-hosted Jetpack blogs connected to WordPress.com. I replaced isSelfHosted with ‘authorId > 0’ to match what the report/block actions actually require, which is that the user has a word press account. These options should only be hidden for external RSS feeds and self hosted sites without Jetpack.
  • Removed the now-unused isSelfHosted() from ReaderUtils and its wrapper.
  • Updated the tests to reflect these changes.

Testing instructions

  1. Check out the trunk branch and find a post that hides the report/block user
  2. Confirm that post is not an external RSS feed or a self hosted site without Jetpack (the user who posted it has a wordpress account)
  3. Check out my branch and view the same post. Validate the report/block user now shows.

Before my fix:
IMG_4053

After my fix:
IMG_1894

Anna Harrison and others added 2 commits February 12, 2026 19:00
…sSelfHosted check used ‘authorBlogId’ (author's site ID) which is -1 for authors without their own site but didn’t account for self-hosted Jetpack blogs connected to WordPress.com. Replaced isSelfHosted with ‘authorId > 0’ to match what the report/block actions actually require, which is that the user has a word press account.
@sonarqubecloud
Copy link

Copy link
Contributor

@jkmassel jkmassel 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 contribution @annaharri89!

Reviewing this, I'm still not sure it's the correct approach – I think all we need to do here is check that the user is currently logged into WordPress.com in order to show that button – if they are, they should be able to block a feed, site, or user that way.

Happy to re-review or discuss further!

@annaharri89
Copy link
Author

@jkmassel I thought you need the id of the user you want to report or block. Even if the current user is signed in to wordpress, that doesn't guarantee a post's author has a wordpress account does it? Or am I misunderstanding?

(hasWordPressAccount is about the post's author not the signed in user)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some posts lack the 'Report this user' and 'Block user' buttons in the overflow menu

2 participants