Skip to:
Content

BuddyPress.org

Ticket #5211: 5211.03.patch

File 5211.03.patch, 956 bytes (added by boonebgorges, 13 years ago)
  • bp-core/bp-core-catchuri.php

    diff --git bp-core/bp-core-catchuri.php bp-core/bp-core-catchuri.php
    index 0b07feb..9b98d13 100644
    function bp_get_canonical_url( $args = array() ) {  
    628628                $front_page_component = array_search( $page_on_front, bp_core_get_directory_page_ids() );
    629629
    630630                // If requesting the front page component directory, canonical
    631                 // URL is the front page
    632                 if ( false !== $front_page_component && is_page( $page_on_front ) ) {
     631                // URL is the front page. We detect whether we're detecting a
     632                // component *directory* by checking that bp_current_action()
     633                // is empty - ie, this not a single item or a feed
     634                if ( false !== $front_page_component && bp_is_current_component( $front_page_component ) && ! bp_current_action() ) {
    633635                        $bp->canonical_stack['canonical_url'] = trailingslashit( bp_get_root_domain() );
    634636
    635637                // Except when the front page is set to the registration page