Skip to:
Content

BuddyPress.org

Changes between Initial Version and Version 1 of Ticket #4086, comment 3


Ignore:
Timestamp:
04/09/2012 09:21:48 PM (12 years ago)
Author:
boonebgorges
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4086, comment 3

    initial v1  
    773) cycle through the results to see if the page_name matches the last part of the request, as in cases where a URL is `http://example.com/boone/is/very/cool/` and the `post_name` is `cool` (with `very` as `post_parent`, `is` as `post_parent` of `very`, etc - the standard WP page setup)
    88
    9 In the case of BP pages, steps (1) and (2) go just fine - WP successfully finds our page called `members` - but it fails at step (3). That's because `members` is not the *last* chunk of the request, which in turn is because we are constructing our URLs in a non-standard way. As a result, the function returns false, and `WP::parse_request()` fails to locate a match, which is the source of the 404. (BTW, having an attachment or a manually created page with `post_name = 'admin`` will trick `get_page_by_path()` into returning true, which explains wpdennis's perplexing attachment report in the OP.)
     9In the case of BP pages, steps (1) and (2) go just fine - WP successfully finds our page called `members` - but it fails at step (3). That's because `members` is not the *last* chunk of the request, which in turn is because we are constructing our URLs in a non-standard way. As a result, the function returns false, and `WP::parse_request()` fails to locate a match, which is the source of the 404. (BTW, having an attachment or a manually created page with `post_name = 'admin'` will trick `get_page_by_path()` into returning true, which explains wpdennis's perplexing attachment report in the OP.)
    1010
    1111There are a couple of things we could do to fix this.