[buddypress-trac] [BuddyPress Trac] #6527: BP mangles $wp_query when viewing member's profile
buddypress-trac
noreply at wordpress.org
Wed Jun 24 06:54:59 UTC 2015
#6527: BP mangles $wp_query when viewing member's profile
---------------------------------+------------------------------
Reporter: mikelopez | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Component - Members | Version: 2.3.0
Severity: normal | Resolution:
Keywords: 2nd-opinion |
---------------------------------+------------------------------
Comment (by r-a-y):
> A quick question, why is that activity pages such as /activity/xxxx
return the proper page ID even though the requested URL is not valid?
Good question. This is due to WP's split page parsing when a number is
used after a page slug. For example, you could go to a URL like this:
`example.com/sample-page/999/` (replace 999 with any number)
And that will still render the page with the `sample-page` queried object
because WP thinks 999 is a split page (to me, this is a WP bug). An
authentic split page uses the `<!--nextpage-->` tag in the post content:
http://codex.wordpress.org/Styling_Page-Links
If you add an invalid non-numeric page slug after `sample-page` like
`/sample-page/blah/`, this would render a 404.
Since `/activity/` is a valid WP post slug and you are using a number
after the slug, the behavior above describes what is happening.
> Is it possible to do the same handling for /members/aaaaaa and other
similar URLs?
Knowing the loophole above, you can get the queried object if the username
is numeric :) But that's about it.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6527#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list