[wp-trac] [WordPress Trac] #12323: WPMU: Original images linked when using [gallery] instead of edited images.
WordPress Trac
wp-trac at lists.automattic.com
Sun Feb 21 17:15:31 UTC 2010
#12323: WPMU: Original images linked when using [gallery] instead of edited images.
--------------------------+-------------------------------------------------
Reporter: materdaddy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: Media | Version: 2.9.1
Severity: minor | Keywords: gallery, wpmu
--------------------------+-------------------------------------------------
When using the built-in [gallery] in WPMU, any images you've edited using
the built-in "media" editing will have anchors that point to the original
image rather than the edited image.
Steps to reproduce:
* Upload images to a post.
* Rotate an image and save.
* Use [gallery link="file"] in your post.
Expected Behavior:
Gallery shown in your post with the edited images, clicking one should
show the full sized edited file.
Actual Behavior:
Gallery is shown in your post with the edited images, however clicking
one results in a link to the original (non-rotated) images.
Suspect:
wp-includes/post.php - function wp_get_attachment_url()
There is a section of code commented out for MU that says it breaks the
image upload path for MU. This is untrue: The "elseif" check on wp-
content/uploads will evaluate false, then the "else" will just concatenate
the upload's baseurl to the filename resulting in a correct URL if it
weren't commented out.
Because that section of code is commented out, the "$url" variable is
still empty after that if block, and the guid is used instead, which
apparently is the unaltered original image.
Particulars:
* WPMU 2.9.1.1
* Apache2 2.2.11(Ubuntu)
* PHP 5.2.6-3ubuntu4 with Suhosin-Patch 0.9.6.2
* uname: Linux 2.6.30-rc6 #2 PREEMPT Wed May 20 05:42:04 MDT 2009
armv5tel GNU/Linux
* mysql Ver 14.12 Distrib 5.0.75, for debian-linux-gnu (arm) using
readline 5.2
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12323>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list