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

TPerkins’s picture

Status: Active » Closed (fixed)

Wait, looks like you already fixed it in dev. My bad.