Function _modules_weight_modules_list uses drupal_sort_weight() to sort the module list, but that function does not take module name into account resulting in a list that is not correct.
The function needs to be replaced with a function that also considers module name, such as this:
// Sorting all modules by their weight. <<---- remove
// uasort($modules, 'drupal_sort_weight'); <<---- remove
// Sorting all modules by their weight and name.
uasort($modules, '_modules_weight_sort_weight');
return $modules;
}
function _modules_weight_sort_weight($a, $b) {
$a_weight = is_array($a) && isset($a['weight']) ? $a['weight'] : 0;
$b_weight = is_array($b) && isset($b['weight']) ? $b['weight'] : 0;
if ($a_weight == $b_weight) {
return ($a['name'] < $b['name'] ? -1 : 1);
}
return $a_weight < $b_weight ? -1 : 1;
}
Sorry, I do not currently have an environment to produce a proper patch.
Comments
Comment #2
adriancidHi @NancyDru, thanks for reporting this issue.
Comment #4
adriancidComment #5
adriancid