Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#27372 closed defect (bug) (duplicate)

Add Media Button of wp_editor() is no more working on front-end since r27445

Reported by: imath's profile imath Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9
Component: Media Keywords: has-patch
Focuses: Cc:

Description (last modified by SergeyBiryukov)


First, i'd like to congratulate you for the great features introduced in the Media Editor in 3.9 next release.

I've noticed #21811 makes it possible to edit image directly in the Media Editor, which is great :)
Unfortunately, there seems to be an annoying side effect when the wp_editor() is used on front-end or if a plugin uses wp_enqueue_media() on front-end which is my case...
Clicking on the "Add Media" button no more opens the Media Editor since [27445].

I've seen @tomauger in his comment suggested a patch to fix it. It brings back the Media Editor but clicking on the "Edit image" link of the Media details side box loads the Image Edit view without the toolbar. So it's not usable. The problem seems to be that this part needs a css file that is included in the wp-admin one.
I guess it's one good reason to have the is_admin() check before enqueueing image-edit.

On my local dev, i've built an alternative patch which seems to solve the side effect. So i thought you might be interested by it. I hope i didn't do wrong by creating a new ticket instead of carrying on the discussion in the original ticket. If i did, i apologize.

Attachments (1)

27372.diff (2.9 KB) - added by imath 10 years ago.

Download all attachments as: .zip

Change History (5)

10 years ago

#1 @imath
10 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
10 years ago

  • Description modified (diff)
  • Milestone changed from Awaiting Review to 3.9

#3 @iseulde
10 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Since this issue is first mentioned in #21811 and the patch here is based on patches there, I think it's better to continue the discussion in the original ticket. I'll copy your ticket as a comment there.

#4 @SergeyBiryukov
10 years ago

  • Milestone 3.9 deleted
Note: See TracTickets for help on using tickets.