Opened 11 years ago
Closed 11 years ago
#35363 closed defect (bug) (fixed)
Bug js when replacing a audio or video in post editor
| Reported by: | truonght | Owned by: | azaozz |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.5 |
| Component: | Editor | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | javascript |
Description
When I replace a audio or video in editor, browser console show an error:
Uncaught TypeError: Cannot read property 'indexOf' of undefined
In file wp-includes/js/media-audiovideo.js?ver=4.4.1, line 801:
if ( this.model.get( 'src' ).indexOf( 'vimeo' ) > -1 && ! ( 'Froogaloop' in window ) )
I think we should check this.model.get( 'src' ) !== undefined
Attachments (1)
Change History (5)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Confirmed. This is a bit "hacky" place to be checking the src but don't see a better one for now. It only prevents a preview to be shown in the modal, the video/audio is replaced properly in the editor.