Opened 2 years ago
Closed 2 years ago
#17501 closed defect (bug) (fixed)
Javascript errors in press this
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.2 |
| Component: | Press This | Version: | |
| Severity: | major | Keywords: | has-patch needs-testing |
| Cc: |
Description
On press this click embed video, insert some code and click insert video. An error is thrown in Chrome and the box does not close
Uncaught Error: HIERARCHY_REQUEST_ERR: DOM Exception 3
Attachments (2)
Change History (8)
Seems like mceCleanup needs selection
Backtrace
Uncaught Error: HIERARCHY_REQUEST_ERR: DOM Exception 3 c.create.getBookmark -- tiny_mce.js:1 c.EditorCommands.t.mceCleanup -- tiny_mce.js:1 q -- tiny_mce.js:1 m.create.execCommand -- tiny_mce.js:1 j.EditorManager.d.execCommand -- tiny_mce.js:1 append_editor -- press-this.php:161 (anonymous function):4 f.event.handle -- jquery.js:17 f.event.add.k.i.handle.k -- jquery.js:16
Code
mceCleanup : function() {
var bookmark = selection.getBookmark(); // the errors occurs here
editor.setContent(editor.getContent({cleanup : TRUE}), {cleanup : TRUE});
selection.moveToBookmark(bookmark);
},
@azaozz: can you confirm if the latest patch is working? see 17501.2.diff
- Keywords needs-testing added
- Owner set to azaozz
- Status changed from new to reviewing
Assigning to azaozz for review, testing and commit/!commit call.
Replying to greuben:
Seems like mceCleanup needs selection
...
@azaozz: can you confirm if the latest patch is working? see 17501.2.diff
Yes, seems to be working. I dug a bit deeper and think we can skip the forced mceCleanup completely. That seems to happen automatically in this version of TinyMCE. Please reopen if there are still issues when adding videos or images in Press This.

The first arg. for execInstanceCommand() should be the editor ID which is the same as the ID of the textarea that was replaced (content), so the proposed patch seems to be disabling the cleanup.