Opened 16 years ago
Closed 16 years ago
#12323 closed defect (bug) (worksforme)
Original images linked when using [gallery] instead of edited images.
| Reported by: | materdaddy | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Media | Version: | 2.9.1 |
| Severity: | minor | Keywords: | |
| Cc: | Focuses: | multisite |
Description
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
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I updated the summary, but I also think this one is fixed. On my test install [gallery] now shows the cropped image.
If someone can provide steps to reproduce, please re-open.