Opened 10 years ago
Closed 10 years ago
#5721 closed defect (bug) (fixed)
Members directory displaying on more than one page.
Reported by: | xhan | Owned by: | johnjamesjacoby |
---|---|---|---|
Milestone: | 2.2 | Priority: | high |
Severity: | normal | Version: | 1.2.8 |
Component: | Core | Keywords: | |
Cc: |
Description
Steps to reproduce:
Create page template, name the file page-membership-application.php
Any page using this template will load the membership directory.
Cause:
bp-core-template.php is searching for the word 'members' assumes users wont have other page templates with the word members in it.
line 1114
if ( !empty( $page_template ) && strstr( strtolower( $page_template ), strtolower( $component ) ) ) {
I've not tested this too thoroughly as I haven't had time so for now I've just renamed my template page-mem-application.php
Attachments (1)
Change History (8)
#3
@
10 years ago
Dates way back to r3884: "to look for page templates as root_slug's too".
@JJJ: can you take a look at this please?
#4
@
10 years ago
- Milestone changed from 2.1 to 2.2
- Version changed from 2.0 to 1.2.8
Let's pull out strstr early in 2.2 to give us time to see if we can re-discover the edge case, or if JJJ can remember any more details why this change was made.
#5
@
10 years ago
Looks like this was most likely a legacy concern that is improperly matching standard page templates.
#6
@
10 years ago
Patch looks good. It fixes both the original bug, and another redirect issue related to more recent changes to theme compatibility template handling.
Moving to 2.1 for a further look. Using
strstr()
in this way seems really odd to me, so someone should have a look to see why this check was introduced in the first place. (It could be a legacy concern that's no longer relevant.)