#28824 closed defect (bug) (invalid)
Broken JavaScript in featured-image-upload.js; stop execution of JS
Reported by: |
|
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.