Repository navigation
Conversation
…ns yet The “My Posts” and “My @Mentions” views in the sidebar filter link to the current user's author and mentions archives. For anyone who hasn't posted or been mentioned on a site yet, WordPress treats those empty archives as a 404, so the view reads as broken rather than empty. Core only spares author archives for site members, and most Make users aren't members. Keep those archives as a 200 when the user exists and show a “No posts yet” or “No mentions yet” message, like the empty search results page. Unknown users and paged requests still 404. Fixes #3781. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
o2 empties the page content when it loads and only draws an empty state for search and 404 views, so the “No posts yet” and “No mentions yet” message never showed on Make sites. Pass the message to o2 as its search empty state instead. The To Do and Done filters narrow an author or mentions archive, so an empty one there doesn't mean the user has no posts. Leave those as they were. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@propsbot add dd32 |
Fixes https://meta.trac.wordpress.org/ticket/3781
The “My Posts” and “My @Mentions” links in the Make sidebar filter go to the current user’s author archive (
/author/<login>/) and mentions archive (?mentions=<login>). When someone hasn’t posted or been mentioned on that site yet, both return a 404 “Page not found”, which reads as a broken link rather than an empty list. Core only keeps an empty author archive as a 200 for site members, and most Make users aren’t members; a mentions archive has no term until the first mention, so it always 404s.This adds a
pre_handle_404callback to wporg-breathe-2024 that keeps author and mentions archives as a 200 when the user exists, and ano-results-archive.phptemplate part (picked up by the parent theme’sarchive.php) that shows “No posts yet” / “No mentions yet” in the same style as the empty search results page, as suggested in comment:1. o2 replaces the server-rendered content when it loads and only draws an empty state for search and 404 views, so ano2_optionsfilter gives these empty archives o2’s search view with the same message in place of “could not find any results”. Unknown users, paged requests, the To Do/Done filters (?resolved=) and other archives behave as before. Both archive types are already noindexed by wporg-seo.Testing
https://make.wordpress.org/core/author/<your-login>/). Before: 404 “Page not found”. After: 200 with “No posts yet” and “ hasn’t published any posts here yet.”https://make.wordpress.org/core/?mentions=<your-login>). Before: 404. After: 200 with “No mentions yet” and “No posts here mention @ yet.”https://make.wordpress.org/core/author/no-such-user-zzz/and?mentions=no-such-user-zzzstill return a 404, and that an author with posts still lists them.I checked the status codes with a script that runs the main query and
handle_404()in a multisite wp-env, on a site where the user isn’t a member (before: 404 for both; after: 200 for existing users, 404 for unknown users, paged requests and array query vars), and rendered the template part for both cases. The page itself needs a visual check on a Make site, since the p2-breathe parent theme and o2 aren’t in a local environment.Props garrett-eclipse (no linked GitHub account).
🤖 Generated with Claude Code
Summary by CodeRabbit