I would not attempt to disable the error message, as it may well break things in the future. This error pertains to the wp_enqueue_script function. It likely stems from a badly called script include in a plugin or theme. Check all of the plugins and themes you are using for this function (do a search) and check the second parameter. This should be a URL to the script file. If there are any syntax errors or omissions, correct them and try again.
My wild guess is that somewhere, an array such as the dependency (usually the third argument in the function) is being called out of sequence and throwing an error.
J
Thread Starter
EDGE22
(@midnightdonkey)
I found what was causing it, I’m trying to enqueue multiple scripts are once, here’s what I have:
wp_enqueue_script(array(‘jquery’, ‘jquery-ui-core’, ‘jquery-ui-tabs’, ‘cookies’, ‘widget’, ‘jscolor’, ‘fl_toggle’, ‘fl_placeholder’, ‘jquery-ui-sortable’, ‘jquery-ui-draggable’, ‘jquery-ui-droppable’, ‘jquery-ui-selectable’, ), ‘1.0’);
Any clue what’s messed up here?
Thanks,
Tom
I don’t believe you can set an array of handles. I think you’ll need to define them all in separate functions. Don’t forget that the second parameter is the src. If you’re not declaring a script that WordPress has in the core, you’ll need to define this. And remember to obey the parameter orders, i.e. you cannot declare a version number in the second argument, it’s assigned to the fourth.
http://codex.ww.wp.xz.cn/Function_Reference/wp_enqueue_script
Thread Starter
EDGE22
(@midnightdonkey)
Thanks a lot for your help!
Tom