[buddypress-trac] [BuddyPress] #4574: Avatar crop screen filtering on wp_get_attachment_image_src () causes issues
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Wed Oct 3 16:23:04 UTC 2012
#4574: Avatar crop screen filtering on wp_get_attachment_image_src () causes
issues
--------------------------+-----------------------------
Reporter: hnla | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version: 1.6
Severity: major | Keywords:
--------------------------+-----------------------------
BP appears to be filtering wp_get_attachment_image_src() to add 'avatar'
to url path on the crop avatar screen, this causes problems for any images
being fetched via attachment ID.
Scenario:
While working on a framework that sets or re-sets the default site logo
using wp_get_attachment_image_src() I found that when I visited the upload
avatar screen, uploaded a new avatar and then after being dropped back to
the crop screen realised the site logo had vanished. On checking found the
logo url was no longer '/uploads/2012/...' but now
'/uploads/avatar/2012/...' thus unable to fetch non existent image at that
path.
Further tested this on a plain WP/BP install and issue persisted
BP version 1.6 WP 3.4.1
To replicate or test:
Open header.php add:
`<?php $src = wp_get_attachment_image_src( $attachment_id ); ?>`
`<p><?php echo $src[0] ?></p>`
check path shown then navigate to upload new avatar, upload something to
get to crop screen now check the url reported it should now read
/uploads/avatar/...
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4574>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list