#2449 closed defect (bug) (fixed)
WP 3.0: Activity page no longer works as front page [HAS-PATCH]
Reported by: | 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)
Change History (13)
#2
@
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]
#4
@
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.
#7
@
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
@
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
@
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.
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:
(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.