[buddypress-trac] [BuddyPress Trac] #8712: Page not found (404) when trying to access a member profile
buddypress-trac
noreply at wordpress.org
Fri Dec 26 00:50:16 UTC 2025
#8712: Page not found (404) when trying to access a member profile
--------------------------+-----------------------
Reporter: drwebbe | Owner: vapvarun
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 15.0.0
Component: Groups | Version: 10.3.0
Severity: normal | Resolution:
Keywords: |
--------------------------+-----------------------
Changes (by vapvarun):
* owner: (none) => vapvarun
* status: new => assigned
Comment:
Attached a patch that fixes this issue.
Root cause: The check_parsed_query() method in BP_Members_Component
triggers a 404 before the navigation access control can redirect non-
logged-in users to the login page.
When a user clicks an invitation link while logged out, the screen
function isn't hooked (because access is denied), so check_parsed_query()
sees no callable function and immediately returns 404.
Fix: Before calling bp_do_404(), check if:
1. The user is not logged in
2. A nav item exists for this action
3. The nav item has user_has_access set to false
If all conditions are met, call bp_core_no_access() to redirect to login
instead of showing 404.
Commit:
https://github.com/vapvarun/BuddyPress/commit/3ad8bbb1ac7301a6a35bf96fed86b8ae1dec586e
Tested locally - clicking /members/{user}/groups/invites/ while logged out
now redirects to the login page as expected.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8712#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list