[wp-trac] [WordPress Trac] #13145: overly greedy home page url setting
WordPress Trac
wp-trac at lists.automattic.com
Tue Apr 27 14:47:27 UTC 2010
#13145: overly greedy home page url setting
---------------------------+------------------------------------------------
Reporter: usermrpapa | Owner: ryan
Type: defect (bug) | Status: new
Priority: high | Milestone: Unassigned
Component: Rewrite Rules | Version:
Severity: major | Keywords:
---------------------------+------------------------------------------------
we are having an issue with displaying a static page on the front page
with WP 3.0.
Our plugin (a forum plugin) actually dynamically generates its page
content and displays it on the single WP page. Additionally, we generate a
series of rewrite rules for the appearance of pseudo pages/subpages on
this single WP page (ie forum and topic pages)
In previous WP versions we have been able to have our page be used as the
static front page for WP sites, but this has stopped functioning in WP
3.0.
I believe we have traced it down to a change in wp-includes/canonical.php
at lines 103 and 104:
{{{
} elseif ( is_page() && !is_feed() && isset($wp_query->queried_object) &&
'page' == get_option('show_on_front') && $wp_query->queried_object->ID ==
get_option('page_on_front') && ! $redirect_url ) {
$redirect_url = home_url('/');
}}}
Basically, here a decision was made that if it is a page set as the
'home/front' link then just simple throw away the url and use the
home_url.
This appears a bit 'greedy' and bypasses any url rewriting done for that
page. It also will 'break' any plugin (ecommerce also comes to mind) that
dynamically generats page content and tries to be set as the front page.
Seems like this direct shouldn't be so absolute to the home url. Or at a
minimum, plugins should be able to override/filter this.
thoughts?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13145>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list