[buddypress-trac] [BuddyPress Trac] #5335: Problem with Retrieving avatar's
buddypress-trac
noreply at wordpress.org
Mon Jan 13 20:18:06 UTC 2014
#5335: Problem with Retrieving avatar's
--------------------------+-----------------------------
Reporter: vusisindane | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version: 1.9.1
Severity: normal | Keywords:
--------------------------+-----------------------------
I'm using buddypress 1.9.1 and here's the problem.
After submitting the cropped image, inside wp-core-avatars.php in
bp_core_avatar_handle_crop(), buddypress uses wp_crop_image() to resize.
The trouble is,
--> wordpress uses wp_unique_filename() inside wp_crop_image()
----> and that function uses sanitize_file_name()
------> sanitize_file_name
the function santize_file_name() changes the destination file and removes
the buddypress suffix "-bpfull" and "-bpthumb" that were added in the
bp_core_avatar_handle_crop() function.
So when the cropped images are set, buddypress cannot find them using the
bp_core_fetch_avatar() function because it specifically looks for images
with those suffixes (-bpthumb & -bpfull) respectively.
So after uploading and cropping an image, I can find it in the directioty
"wp-content/uploads/avatar/#/", but bp cannot retrieve it because the file
does not have the correct suffix i.e. (-bpthumb or -bpfull).
Hope this makes sense.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5335>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list