#3747 closed defect (bug) (fixed)
Ugly links and previews do not work when Settings / Reading / Front page = static BuddyPress page
Reported by: | henrybcn | Owned by: | |
---|---|---|---|
Milestone: | 1.5.2 | Priority: | normal |
Severity: | normal | Version: | 1.5 |
Component: | Core | Keywords: | needs-testing needs-patch |
Cc: |
Description
Ugly links (/?p=N) and previews do not work when Settings / Reading / Front page = static BuddyPress page in BP 1.5.1 and WP 3.2.1, default BP theme
Reproduce:
1) Settings / Reading / Front page = Activity page
2) Create a new page
3) Click preview
Now, the Activity page shows, not the content of the new page. The web address bar reads: example.com/?p=N&preview=true.
4) Publish page
5) Edit page
Now, preview works.
6) Add an ugly link to page content, <a href="/?p=N" title="test">test page</a>
7) Publish / update page
8) Got to page, and click on "test page"
Now, the Activity page shows, not the "test page"
9) Change Settings / Reading / Front page = a not BP page or Your Latest Post
10) Previews and ugly link work
11) Change Settings / Reading / Front page = Forums
12) Preview a page in draft status
Now, this error shows "This webpage has a redirect loop" (Chrome).
Tested on a plain BP install, no other plugins than BP 1.5.1
This is a very tricky problem. It's related to the fact that we are now using WP pages to display content in BP.
The place where it makes the most sense to fix the issue is in bp_core_set_uri_globals(). Unfortunately, that function is run too early to take advantage of is_preview() ($wp_query isn't fully populated yet), so I'm going to have to add a manual check.