Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#29733 closed defect (bug) (duplicate)

Unable to insert image using drag-and-drop on custom wp_editor

Reported by: aduth Owned by:
Priority: normal Milestone:
Component: Editor Version: 4.0
Severity: normal Keywords: has-patch dev-feedback
Cc: Focuses: javascript

Description

Steps to reproduce:

1) Create a page with an instance of wp_editor using a non-standard ID (i.e. anything other than "content")
2) When viewing the page, drag and drop an image into editor (on fresh page reload, not having opened media library prior to dragging)
3) Click "Insert into post"

Expected outcome:

Uploaded image is inserted into post

Actual outcome:

Uploaded image is not inserted into post

Cause:

The "drop" event handler creates a new "workflow" instance if one does not already exist using a hard-coded "content" ID despite the custom ID being used.

Attachments (1)

drag-drop-custom-editor-fix.diff (495 bytes ) - added by aduth 12 years ago.
Resolution

Download all attachments as: .zip

Change History (4)

@aduth
12 years ago

Resolution

#1 @johnbillion
12 years ago

  • Component MediaEditor
  • Keywords has-patch needs-testing added
  • Version trunk4.0

#2 @valendesigns
12 years ago

  • Keywords dev-feedback added; needs-testing removed

I've tested patch drag-drop-custom-editor-fix.diff against trunk and it does solve the issue. To verify I created a post with a non standard wp_editor() and attempted to add an image via drag and drop. That image was inserted into the content after clicking "Insert into post" instead of my custom editor. After applying the patch the image was correctly inserted into the non standard editor. Problem solved.

Cheers,
Derek

#3 @iseulde
11 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

Duplicate of #32527.

Sorry that we didn't address this problem when it was first reported.

Note: See TracTickets for help on using tickets.