The use of JS_LIBRARY in system_library() is confusing

Created on 2 October 2011, over 12 years ago
Updated 15 September 2023, 9 months ago

Currently, some libraries in system_library() are explicitly put into group JS_LIBRARY, while some others have no 'group' value assigned. For example, jQuery UI Core is explicitly put into group JS_LIBRARY, whereas jQuery UI Accordion has no group value set. This makes one think accordion is put in group JS_DEFAULT, however, this is not the case, as everything added with drupal_add_library() is automatically put in group JS_LIBRARY by this line of code:
$added[$module][$name] = drupal_process_attached($elements, JS_LIBRARY, TRUE, $every_page);

To clean up this incomprehensible mess, we should either
* specify a 'group' value JS_LIBRARY for every library (instead of not specifying it at all), or
* remove the 'group' value whenever it matches the default value.

🐛 Bug report
Status

Closed: outdated

Version

7.0 ⚰️

Component
System 

Last updated 1 day ago

No maintainer
Created by

🇮🇹Italy smk-ka

Live updates comments and jobs are added and updated live.
  • API clean-up

    Refactors an existing API or subsystem for consistency, performance, modularization, flexibility, third-party integration, etc. May imply an API change. Frequently used during the Code Slush phase of the release cycle.

  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

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.69.0 2024