The jquery UI library doesn't load on my page

while the jquery one as loaded

Comments

leandro713’s picture

i have observed the problem and i guess this module sometimes doesnt work because Drupal not always (at least my D7 installation on my testing machine at work) loads jquery.ui
in order to be sure Drupal loads it, you can get working this module pasting the following code to the «jquery_cdn.module» file (maybe at the top of it)

function jquery_cdn_init(){
  drupal_add_library('system','ui');
}

adding this it works for me. i will try to commit this lines to the project afterwards.
-Leandro

leandro713’s picture

StatusFileSize
new470 bytes

@creatile, if you dont want to edit code, i attach patch for your convenience :)

Anonymous’s picture

Assigned: Unassigned » leandro713

Given access to leandro713 to commit his recommendation.

Anonymous’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

An43’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new573 bytes

I think that forcing ui library to load is not the best way to fix this. Drupal core doesn't load jquery.ui as default library and it's not always needed.
This problem is caused by modules/themes that load submodules of jquery.ui without loading jquery.ui core, assuming it will be loaded by the dependencies. So if we unset all ui submodules items, drupal_get_library() returns FALSE and no libraries are loaded.
This patch will cause loading jquery.ui as dependency only if it's needed.

An43’s picture

Sorry, i made a mistake while moving changes from my test server. Here is the right version of the patch.

leandro713’s picture

Status: Needs review » Fixed

An43 patch applied
sorry An43 for the long, long, long delay

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.