WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#12323 closed defect (bug) (worksforme)

Original images linked when using [gallery] instead of edited images.

Reported by: materdaddy Owned by:
Milestone: Priority: normal
Severity: minor Version: 2.9.1
Component: Media Keywords:
Focuses: multisite Cc:

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

Change History (4)

comment:1 @nacin5 years ago

  • Keywords multisite added; gallery wpmu removed
  • Milestone changed from Unassigned to 3.1

comment:2 @wpmuguru5 years ago

  • Resolution set to fixed
  • Status changed from new to closed
  • Summary changed from WPMU: Original images linked when using [gallery] instead of edited images. to Original images linked when using [gallery] instead of edited images.

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.

comment:3 @nacin5 years ago

  • Milestone Awaiting Triage deleted
  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:4 @nacin5 years ago

  • Resolution set to worksforme
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.