#31111 closed defect (bug) (worksforme)
jQuery UI errors when using bundled UI and Effects
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.1 |
Component: | General | Keywords: | |
Focuses: | ui, javascript | Cc: |
Description
While trying to use jQuery UI Effects I kept receiving an error (see screenshot) when I was using the bundled copy of jQuery UI and jQuery UI Effects. I don't know what the error is or how to fix it, but if I swap out a fresh downloaded full copy of jQuery UI in place of the bundled copy then my code worked, and there were no errors.
It gave the error with no other plugins activated and using the default theme.
Possible bug?
Attachments (1)
Change History (6)
#2
in reply to:
↑ 1
@
10 years ago
Replying to ocean90:
Hello awarren, welcome to Trac.
Can you please provide a simple plugin or some code so we can reproduce the issue?
Since [29847] we build the minified files by ourselves, so there could be indeed an issue.
This is the site I was getting the error on: http://build.andywarren1.com/simple-sorter/ It currently has the fresh new copy of jQuery UI enqueued rather than the bundled copy.
I'm trying to build a plugin, and that's how I was getting the error. I'll attach a copy of the plugin above so you can try to reproduce it.
#3
@
10 years ago
I couldn't reproduce the issue. jquery-effects-core
includes only the core functionalty. You've to enqueue each effect you want to use too. Something like this should work in your plugin:
$dependencies = array( 'jquery-ui-core', 'jquery-effects-core' ); switch ( $a['animation'] ) { case 'fade' : $dependencies[] = 'jquery-effects-fade'; break; case 'scale' : $dependencies[] = 'jquery-effects-scale'; // No break because scale needs size too case 'size' : $dependencies[] = 'jquery-effects-size'; break; } // enqueue custom jQuery and localize the script wp_enqueue_script( 'aw_simple_sorter_js', plugin_dir_url( __FILE__ ) . 'js/aw_simple_sorter.js', $dependencies );
Can you still reproduce this with the changes above? Is this specific to a browser?
#4
@
10 years ago
- Resolution set to worksforme
- Status changed from new to closed
I do not receive the error when enqueuing each individual effect. I was unaware of the need to enqueue each individual effect along with the UI Effects Core. Apologies for the Trac ticket, actually thought I'd found a possible bug.
Hello awarren, welcome to Trac.
Can you please provide a simple plugin or some code so we can reproduce the issue?
Since [29847] we build the minified files by ourselves, so there could be indeed an issue.