jquery.ui.dialog.min.js is still included in WP, but your plugin should be calling it as required in wp_enqueue_script
to ensure it’s called on the pages it’s used. Which plugin is this?
Thread Starter
heatmap
(@stuartwider)
Thanks Mika,
Its Click Missile plugin but its not in the repo.
Its got a tinymce button which pops up a box so ad short codes can be inserted.
Yes, I now see the script is there in 3.9 and am now enqueueing it from within the plugin rather than relying on wp to do it by default.
It always seemed to work though in previous WP versions without having to enqueue it in the plugin so other plugins with similar functionality may break if not updated to cater for the change.
For others reading this with similar jquery dialog issues when 3.9 drops
the following code was required to make things work again….
wp_enqueue_script( 'jquery-ui-dialog' );
wp_enqueue_style( 'wp-jquery-ui-dialog' );
Looks like jquery-ui-dialog
is no longer automatically enqueued since [27494].
It would be better to put jquery-ui-dialog as a requirement:
wp_enqueue_script(
'myscript',
plugins_url( '/myscript.js' , __FILE__ ),
array( 'jquery-ui-dialog' )
);
So you have one enqueue script 🙂 But that’s semantics.
Thread Starter
heatmap
(@stuartwider)
…hears sound of a thousand plugin owners dashing to awesome page above to fix their jquery dialogs…
…closely followed by wailing and gnashing of teeth after release of 3.9 from users of plugins that don’t get updated 🙂
Thread Starter
heatmap
(@stuartwider)
Just as a further update for others who come across this thread…
When jquery-ui-dialog is used in a theme or plugin but the function is not found in 3.9 it can create a javascript error which can then potentially block other dynamic parts of the page from working (at least it did for my plugin until I fixed it for 3.9).
So for instance if the plugin adds a popup dialog with a tinymce button in the post page, if the jquery dialog function is not enqueued then side effects I noticed were as follows:
– items in the ‘Published’ metabox did not slide open as they should
– this includes the ‘status’ and ‘visibility’ fields
So if you suddenly notice that items in the publish metabox do not work, then have look to see if its because jquery dialog has not been enqueued in 3.9
FWIW, I brought this up with the core team as a potential arrrg moment.
It’s one of those things where developers should have been enquing it begin with, but since it was on the only page they’d use it on (for the most part) they didn’t notice.
wpdialogs is what was removed, and is what called jquery-ui-dialog from what I can see.
Thread Starter
heatmap
(@stuartwider)
Thanks for that Mika.
If anything happens with that let us know if you can. Ta 🙂
Much appreciated.