Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#40847 closed defect (bug) (wontfix)

the wpImageFormSubmit JS event has disappeared from the tinymce image plugin

Reported by: imath's profile imath Owned by: azaozz's profile azaozz
Milestone: Priority: normal
Severity: normal Version: 4.8
Component: Editor Keywords: has-patch dev-feedback
Focuses: javascript Cc:

Description

Since [40583] some specific WordPress code has disappeared from the src/wp-includes/js/tinymce/plugins/image/plugin.js file.

There used to be an event that was fired to inform the regular image plugin form was submitted: wpImageFormSubmit. I was listening to it in one of my plugin :(

I don't know if it could have an impact on WordPress Core more globally, but i thought i had to let you know.

Attachments (1)

40847.patch (928 bytes) - added by imath 8 years ago.
The specific WordPress code which disappeared.

Download all attachments as: .zip

Change History (8)

@imath
8 years ago

The specific WordPress code which disappeared.

#1 @ocean90
8 years ago

  • Focuses javascript added
  • Keywords has-patch dev-feedback added
  • Milestone changed from Awaiting Review to 4.8
  • Owner set to azaozz
  • Status changed from new to reviewing

@azaozz Was there a reason for that? Looks like an oversight to me.

#2 @azaozz
8 years ago

This was an old "hack" to the TinyMCE image plugin left over from the initial implementation in WordPress 3.9. There were few more events added in there. It probably should have been removed long time ago (note that this plugin is not used by default in WP). In TinyMCE 4.6 the plugin was changed quite significantly to keep maintaining this hack.

If a third party plugin still needs the changed default image plugin, it would be best to include it and add it as external plugin to TinyMCE.

#3 follow-up: @ocean90
8 years ago

@imath What's the name of your plugin?

Should we search the plugin directory for wpImageFormSubmit and inform the plugin authors?

This ticket was mentioned in Slack in #core by ocean90. View the logs.


8 years ago

#5 @imath
8 years ago

Hi @ocean90

It's WP Idea Stream. But i've just updated it so that it doesn't use this event anymore. I've fixed my issue using the setcontent event.

I don't know if there are some plugins still using it, i don't know what's best to warn plugin authors. Maybe a Post in Make.WordPress.org is enough.

#6 in reply to: ↑ 3 @SergeyBiryukov
8 years ago

Replying to ocean90:

Should we search the plugin directory for wpImageFormSubmit and inform the plugin authors?

Only 4 distinct results in the plugin directory:

media-credit/admin/js/tinymce4/media-credit-tinymce.js
media-credit/admin/js/tinymce4/media-credit-tinymce.min.js
wa-fronted/js/min/scripts.min.js
wa-fronted/js/tinymce/tinymce.image.js
wp-front-end-editor/js/tinymce.image.js
wp-idea-stream/js/featured-images.js
wp-idea-stream/js/featured-images.min.js

#7 @azaozz
8 years ago

  • Milestone 4.8 deleted
  • Resolution set to wontfix
  • Status changed from reviewing to closed

It appears this doesn't break any of these plugins. After all it was an old "private event hack" for a TinyMCE plugin that is not used by default in WordPress :)

Note: See TracTickets for help on using tickets.