Closed (fixed)
Project:
LABjs
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 May 2011 at 15:22 UTC
Updated:
10 May 2011 at 16:19 UTC
This portion of labjs_preprocess_page doesn't keep the original order of the core scripts (drupal.modified.js always ends up last). This causes problems on pages with drag and drop as tabledrag.js needs to be loaded after drupal.js.
Original:
$scripts['core'][drupal_get_path('module', 'labjs') .'/drupal.modified.js'] = $scripts['core']['misc/drupal.js'];
unset($scripts['core']['misc/drupal.js']);
$variables['scripts'] = drupal_get_js('header', $scripts);
Could be changed to (there might be a more elegant way of doing it):
$scripts_core = array();
foreach($scripts['core'] as $key => $value){
if($key == 'misc/drupal.js'){
$key = drupal_get_path('module', 'labjs') .'/drupal.modified.js';
}
$scripts_core[$key] = $value;
}
$scripts['core'] = $scripts_core;
Comments
Comment #1
TPerkins commentedWait, looks like you already fixed it in dev. My bad.