Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#28824 closed defect (bug) (invalid)

Broken JavaScript in featured-image-upload.js; stop execution of JS

Reported by: paulschreiber's profile paulschreiber Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: General Keywords:
Focuses: javascript, administration Cc:

Description

SUMMARY
JavaScript on some admin pages doesn't work because an error in featured-image-upload.js stops execution.

Here's the backtrace in from Safari.

TypeError: 'undefined' is not an object (evaluating 'wp.media.editor.send')
media_upload (featured-image-upload.js, line 5)
(anonymous function) (featured-image-upload.js, line 27)
j (load-scripts.php, line 2)
fireWith (load-scripts.php, line 2)
ready (load-scripts.php, line 2)
J (load-scripts.php, line 2)

The line in question is

_orig_send_attachment = wp.media.editor.send.attachment;

If I set a breakpoint there, wp and wp.media are objects, but wp.media.editor is undefined.

STEPS TO REPRODUCE
1 Go to /wp-admin/post.php?post=XXXX&action=edit
2 Click Add Media

EXPECTED
Add Media lightbox appears

ACTUAL
No visible change. Error in JS console.

REGRESSION
Reproduced in 4.0b1 and 4.0-alpha-20140710.
Reproduced in Chrome 35 and Safari 7.

Change History (2)

#1 @paulschreiber
11 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#2 @DrewAPicture
11 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.