Make WordPress Core

Opened 14 years ago

Closed 13 years ago

#23154 closed defect (bug) (fixed)

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

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

Description

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 14 years ago.
23154.2.diff​ (1.4 KB ) - added by SergeyBiryukov 13 years ago.

Download all attachments as: .zip

Change History (7)

#1 @SergeyBiryukov
14 years ago

  • Component General → Media
  • Keywords has-patch added
  • Milestone Awaiting Review → 3.6

Related: #22312

#2 @kevinlangleyjr
14 years ago

  • Cc kevinlangleyjr added

#3 @SergeyBiryukov
13 years ago

#24258 was marked as a duplicate.

#4 @SergeyBiryukov
13 years ago

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

#5 @SergeyBiryukov
13 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → 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.