Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#23154 closed defect (bug) (fixed)

Media library won't display images when there's broken attachment parents

Reported by: viniciusmassuchetto's profile viniciusmassuchetto Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch
Focuses: Cc:


When debug is enabled and there's a problem getting the parent of an attachment, get_attachment_link will thrown a "Trying to get property of non-object" notice that breaks the JSON response of the ajax performed by the new 3.5 media library window.

Attachments (2)

23154.diff (621 bytes) - added by viniciusmassuchetto 11 years ago.
23154.2.diff (1.4 KB) - added by SergeyBiryukov 11 years ago.

Download all attachments as: .zip

Change History (7)

#1 @SergeyBiryukov
11 years ago

  • Component changed from General to Media
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.6

Related: #22312

#2 @kevinlangleyjr
11 years ago

  • Cc kevinlangleyjr added

#3 @SergeyBiryukov
11 years ago

#24258 was marked as a duplicate.

#4 @SergeyBiryukov
11 years ago

23154.2.diff is a patch combined with the one in #24258. Should also resolve #22312.

#5 @SergeyBiryukov
11 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 24182:

Avoid PHP notices in Media Library if an attachment parent does not exist. props trepmal, viniciusmassuchetto, alex-ye, adamsilverstein for initial patches. fixes #22312. fixes #23154.

Note: See TracTickets for help on using tickets.