#23876 closed defect (bug) (fixed)
Embedding mp3 breaks TinyMCE
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | 3.4 |
Component: | TinyMCE | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
Add a simple mp3 embed tag to a page in the Text (HTML) mode. Switch to the Visual mode, and you won't be able to get back to the Text mode.
<embed src="example.mp3" width="640" height="480">
The resulting JS error blames the TinyMCE:
Uncaught TypeError: Cannot read property '0' of undefined in editor_plugin_src.js:480
Attachments (3)
Change History (9)
#3
@
11 years ago
23876.diff works, but I get this when switching to Text mode:
<object width="640" height="480" classid="clsid:undefined"><param name="src" value="example.mp3" /><embed width="640" height="480" src="example.mp3" /></object>
23876.2.diff removes classid="clsid:undefined"
.
#4
@
11 years ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In 23895:
#6
@
11 years ago
- Cc spocke added
Looked at that too, it's more complex than just fixing the error. The MCE media plugin shouldn't wrap a simple <embed> tag in an <object>.
Looks like it gets the internal 'type' wrong (as it looks at the mp3 extension) and assumes it's an <audio> tag rather than <embed>. 23876-3.patch fixes that (and doesn't require the other fixes) but needs more testing.
This seems like a major problem especially given new stuff in 3.6.