Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#2449 closed defect (bug) (fixed)

WP 3.0: Activity page no longer works as front page [HAS-PATCH]

Reported by: rvenable's profile rvenable Owned by:
Milestone: 1.2.5 Priority: major
Severity: Version:
Component: Activity Keywords: has-patch
Cc:

Description

On WP 3.0, when selecting the Activity page as the front page, the front page loads to the 404 Page not found.

Attachments (2)

activity_front_page.diff (1.0 KB) - added by rvenable 14 years ago.
2449.001.diff (1.0 KB) - added by cnorris23 14 years ago.
update of rvenable's patch

Download all attachments as: .zip

Change History (13)

#1 @rvenable
14 years ago

  • Keywords has-patch added

It seems the problem comes from some changes to WP_Query::get_queried_object() (WP changeset: http://core.trac.wordpress.org/changeset/13501)

It now checks $wp_query->post is not null:

elseif ( $this->is_page && !is_null($this->post) )

(http://core.trac.wordpress.org/browser/tags/3.0/wp-includes/query.php#L2746)

The simple solution is just to add some dummy post data, which is what my patch does.

#2 @rvenable
14 years ago

  • Summary changed from WP 3.0: Activity page no longer works as front page to WP 3.0: Activity page no longer works as front page [HAS-PATCH]

#3 @rvenable
14 years ago

  • Priority changed from normal to major

#4 @r-a-y
14 years ago

Hi rvenable, great patch!

Can you test this on WP 2.9.2 just to see if it doesn't break activity stream as frontpage on there?

I'm guessing it should work, but it's better to be safe than sorry!

If it breaks, you could check the WP version with the $wp_version global before applying your hook to the_posts.

#5 @rvenable
14 years ago

WP 2.9.2?! That's so last week!

No problem though, I'll test it on monday.

#6 @johnjamesjacoby
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3056]) Fix #2449

#7 @r-a-y
14 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

@jjj - With changeset [3056], check the body_class, it's 404. rvenable's patch is better because it doesn't rely on the 404_template (which I previously used myself).

#8 @paulhastings0
14 years ago

I can confirm that @rvenable's patch worked for my install when I placed it in my child theme's functions.php file.

I'm running WP 3.0 and BP 1.2.4.1

#9 @cnorris23
14 years ago

@jjj
[3056] breaks activity-stream-as-the-homepage functionality for those still running WP 2.9.2. While I can't speak for 3.0 at the moment, @rvenable's patch seems to work (it doesn't break the functionality for 2.9.2), albeit with a "missing argument" error.

@rvenable
The 'the_posts' filter only has one argument, the posts object, and therefore $wp_query should be, instead, called into the global scope as in bp_dtheme_fix_get_posts_on_activity_front(). I've updated the patch to reflect this.

@cnorris23
14 years ago

update of rvenable's patch

#10 @johnjamesjacoby
14 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed again in r3066

#11 @johnjamesjacoby
14 years ago

props rvenable, cnorris23

Note: See TracTickets for help on using tickets.