1

I'm writing this question having already found a solution, in order to see whether other people have encountered this problem.

I was having a problem on the back end of a site I am building in wordpress in which all the jquery scripts that I tried to load using the native wordpress handles (i.e. jquery-ui-core, jquery-ui-sortable, etc) were not loading. If I checked the state of those script handles using the wp_script_is() function, it showed that they were registered, enqueued, but not printed. At the same time my load-scripts.php file was registering an error: "jQuery not defined'.

It turns out that this problem has something to do with a new feature added in Wordpress 3.5 that attempts to concatenate all javascript requests into a single call. This feature, however, was causing conflicts for some reason with some plugins. That at least is what Kevin Leary has reported here. The solution that Leary describes is to disable this feature by adding the following line to the wp-config.php file (after the line defining the ABSPATH):

define('CONCATENATE_SCRIPTS', false);

Does anyone understand why this bug is occurring? And is this a bug in the new version of Wordpress?

3
  • 1
    What Plugins, specifically? What are those Plugins doing with respect to wp_deregister_script() and/or wp_register_script() (or their enqueue/dequene relatives)? Mar 23, 2013 at 15:36
  • the plugin was a variant of fotobook, a plugin for grabbing photos from facebook. the plugin does nothing with registering or deregistering, although the site itself deregisters the main wordpress jquery handle and the re-registers it to point to the google cdn verrsion...
    – fraxture
    Mar 24, 2013 at 1:11
  • "although the site itself deregisters the main wordpress jquery handle and the re-registers it to point to the google cdn verrsion" - and if you get rid of that functionality, do you still observe the problems you indicate in the OP? Mar 24, 2013 at 17:57

1 Answer 1

2

From this OP comment:

although the site itself deregisters the main wordpress jquery handle and the re-registers it to point to the google cdn verrsion

That is your problem.

The problem isn't an issue with WordPress 3.5 per se, nor is it a problem with Plugins.

The problem is that you're deregistering the core jQuery version (itself an inherent problem, that causes all sorts of other problems), and you're probably doing so at an action that causes other scripts not to be able to grab jQuery as a required dependency.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.