Created on 8 April 2019, almost 6 years ago
Updated 18 June 2023, almost 2 years ago

The latest 2.2 update broke the module for me when js is aggregated. This doesn't seem to affect other installations than this particular site. However, this seems easily solved by re-arranging the scopes/weights for all the included files. Example:

   $form['module_filter'] = array(
     '#type' => 'module_filter',
     '#attached' => array(
       'js' => array(
-        drupal_get_path('module', 'module_filter') . '/js/modules.js' => array('weight' => 1),
+        array(
+          'data' => drupal_get_path('module', 'module_filter') . '/js/modules.js',
+          'type' => 'file',
+          'weight' => $js_weight++,
+          'scope' => 'footer'
+        ),
       ),
     ),
   );

Same needs to be applied for other included files inside of module_filter_form_system_modules_alter(). Patch forthcoming.

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bburg Washington D.C.

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024