Skip to:
Content
Pages
Categories
Search
Top
Bottom

Profile URLs don't work properly.


  • Dennis Pedrie
    Participant

    @dennispedrie

    Hi,

    I just installed BuddyPress on WordPress 2.9.2, and I used the theme compatibility plugin to fix the theme for bp. The problem is, the URL for the profile page is like /members/Dennis Pedrie/profile/.

    It redirects me back to the home page. Going to /members/ works fine.

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)

  • Dennis Pedrie
    Participant

    @dennispedrie

    I fixed the adminbar by changing line 72 of bp-core-adminbar.php to:

    echo '<a id="bp-admin-' . $nav_item['css_id'] . '" href="' . str_replace( $bp->displayed_user->userdata->user_nicename, $bp->loggedin_user->userdata->user_login, $nav_item['link'] ) . '">' . $nav_item['name'] . '</a>';

    And lines 79-82 to:

    $link = str_replace( $bp->displayed_user->userdata->user_nicename, $bp->loggedin_user->userdata->user_login, $subnav_item['link'] );
    $name = str_replace( $bp->displayed_user->userdata->user_login, $bp->loggedin_user->userdata->user_login, $subnav_item['name'] );
    $alt = ( 0 == $sub_counter % 2 ) ? ' class="alt"' : '';
    echo '<li' . $alt . '><a id="bp-admin-' . $subnav_item['css_id'] . '" href="' . $link . '">' . $name . '</a></li>';


    Dennis Pedrie
    Participant

    @dennispedrie

    But that only fixes the menu. Links on the profile page are still wrong.

    I think it is something to do with bp_core_get_username() asking for a Display Name rather than a User Login. Any ideas?

    Sorry, I promise I’m not being an ass with the bumping on purpose.


    intimez
    Participant

    @intimez

    Try accessing it using this instead:

    /members/Dennis-Pedrie/profile/


    Dennis Pedrie
    Participant

    @dennispedrie

    That redirects me home. It works fine when it’s given a username (/members/dpedrie/profile), but none of the links throughout all of buddypress give you the correct link.


    intimez
    Participant

    @intimez

    That’s odd. If you sign up typing in Dennis Pedrie as the username (not Name), then the profile link should be /members/Dennis-Pedrie/profile

    I tested using Guest User and it’s /members/Guest-User/profile

    [wordpress2.9.2 + buddypress1.2]


    Dennis Pedrie
    Participant

    @dennispedrie

    I finally fixed it by defining BP_ENABLE_USERNAME_COMPATIBILITY_MODE in wp-config.php

    Dennis, I was able to apply that to my wp-config.php file and the view profile link works…but some of the other links (edit profile) don’t work.

    Any idea why?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Profile URLs don't work properly.’ is closed to new replies.
Skip to toolbar