Opened 13 years ago
Closed 13 years ago
#22284 closed defect (bug) (fixed)
Beta Media button fails on frontend
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 3.5 | Priority: | low |
| Severity: | normal | Version: | 3.5 |
| Component: | Media | Keywords: | |
| Focuses: | Cc: |
Description
Basically, if you add wp_editor() somewhere on the frontend and then hit the new beta media button you get a JS error (TypeError: e is undefined) in underscore.min.js.
Tested this with the latest trunk on TwentyTwelve with no active plugins.
Attachments (3)
Change History (18)
#6
@
13 years ago
Using media on the frontend with wp_editor() currently does not cause any errors. That said, we could use a few bits of CSS to lock the styles in place.
Enqueuing anything that depends on wp-plupload (such as media-upload) without calling wp_plupload_default_settings() first will cause any dependent script to break, as wp.Uploader bails without its settings. The best way to fix this at the moment is probably to inspect whether the wp-plupload script is enqueued at the standard script printing points, and if so, generate its settings first.
Using this inside the Twenty Twelve theme...
wp_editor('Test content', 'frontend_editor');There's certainly something wrong here as I also get JS errors: