Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#2968 closed defect (bug) (fixed)

User Avatar won't show up in blogs outside buddypress site.

Reported by: chestnut_jp Owned by:
Milestone: 1.5 Priority: normal
Severity: Version: 1.5
Component: Core Keywords:
Cc:

Description

At line 570 of /bp-core/bp-core-avatars.php:

$upload_dir[ 'baseurl' ] = str_replace( get_blog_option( $current_blog->blog_id, 'home' ) , get_blog_option( BP_ROOT_BLOG, 'home' ), $upload_dir[ 'baseurl' ] );

should be changed to:

$upload_dir[ 'baseurl' ] = get_home_url( BP_ROOT_BLOG, '/' ) . get_blog_option( BP_ROOT_BLOG, 'upload_path');

This is because the "upload_dir" for Primary Site(= buddypress site) is fixed at "/wp-content/uploads/" by WordPress 3.x.

Original Script points the "upload_dir" to /wp-content/blogs.dir/files/xxx, which is absolutely wrong.

Avatars of users who use gravatar are not influenced by the original script, but avatars that users uploaded for themselves are not shown in blogs outsite buddypress site.

Change History (4)

#1 @chestnut_jp
9 years ago

  • Version changed from 1.2.6 to 1.3

#2 @djpaul
9 years ago

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

(In [3851]) Fix URL to uploaded avatars on non-BP_ROOT_BLOG sites. Fixes #2451, #2574 and #2968. (branch)

#3 @djpaul
9 years ago

(In [3852]) Fix URL to uploaded avatars on non-BP_ROOT_BLOG sites. Fixes #2451, #2574 and #2968. (trunk)

#4 @DJPaul
9 years ago

  • Milestone changed from Awaiting Review to 1.3
Note: See TracTickets for help on using tickets.