Opened 11 years ago
Closed 11 years ago
#5257 closed defect (bug) (fixed)
Missing page titles on BP 404 pages
Reported by: | henrywright | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 1.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
This issue started happening from 1.9 beta 1. Hence it could be related to the recently resolved ticket: 5149.
When visiting a BP page that doesn't exist such as:
example.com/username/jahayatsfg
a page title <title>example</title>
isn't output.
In contrast, when visiting a WP page that doesn't exist such as:
example.com/about/jahayatsfg
a page title is output.
Note I have root profiles enabled. define ( 'BP_ENABLE_ROOT_PROFILES', true );
Attachments (1)
Change History (15)
#2
@
11 years ago
Hi boonebgorges - thanks for investigating. I've been testing on a site which uses WP 3.7.1, BP 1.9 beta 1. Root profiles are enabled and BuddyPress Follow is active. Twenty Thirteen is the theme. Permalinks are set to /%post_id%/
. Aside from that everything is completely unmodified and as it arrived out-of-the-box.
Let me know where to ping the details if you need admin or FTP access: http://jobtain.co.uk/
#4
@
11 years ago
Can you disable root profiles for a moment to see if that's actually the root (no pun intended) of the problem?
#5
@
11 years ago
I just tried again with root profiles disabled and no luck. The problem still happens.
I just get <title> | Jobtain</title>
as the page title.
#6
@
11 years ago
Hm. I'm afraid that, without being able to reproduce locally, there's not much I can do. You could help by tracing the issue a bit on your problematic installation. You might start with bp_modify_page_title()
in bp-core/bp-core-filters.php.
#7
@
11 years ago
Interestingly when I visit the members directory jobtain.co.uk/members/
I get the page title you would expect.
<title> Page not found | Jobtain</title>
But when I visit the sitewide activity page jobtain.co.uk/activity/
I get the broken page title
<title> | Jobtain</title>
#8
@
11 years ago
Thanks for the idea of where to look - I think the problem is definitely associated with the logic in that function because removing && !is_404()
from line 358 resolves the problem for /members/username/jahayatsfg
That said, jobtain.co.uk/activity/jahayatsfg
is still giving <title> | Jobtain</title>
#9
@
11 years ago
To resolve this for the sitewide activity page, I added
if ( is_404() ) return $title;
right after
global $bp;
A few questions remain
- Would this break stuff elsewhere?
- Considering you can't reproduce - Is the problem related to my install? i.e. is this fix even needed? - i'm puzzled because the install is completely un-customised.
#10
@
11 years ago
I can duplicate henrywright's page title problem when:
- Root profiles are enabled and when navigating to a non-existing profile page like:
domain.com/USERNAME/doesnt-exist/
- Navigating to a non-existing group page like:
domain.com/groups/doesnt-exist/
- Navigating to an existing group with a non-existing nav page like
domain.com/groups/GROUP/doesnt-exist/
should use the 'Page Not Found' title instead of the group name.
henrywright's fix sounds good to me.
A small tidbit is if you have bbPress enabled and you encounter the profile 404 bug, the page title will use the page title set by bbPress instead (USERNAME's profile). Need to post a ticket on bbP trac.
I can't reproduce this. When I visit
example.com/admin/foo/
, where 'foo' does not exist, I get:<title>Page not found | My WP Installation</title>
(where "My WP Installation" is the name of my installation)
The 404 template is also loaded as expected.
This looks to me to be consistent whether root profiles are on or off.
Can you give more details about your setup?