if (!isset($options['group'])) {
          $options['group'] = ($type == 'js') ? JS_LIBRARY : CSS_DEFAULT;



tstoeckler’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)

Well the thing is that there is no CSS_LIBRARY, which is why we use CSS_DEFAULT. I don't get why we wouldn't want to use JS_LIBRARY.

m4tlch’s picture


sun’s picture

Can you provide the error message?

m4tlch’s picture

Notice: Undefined index: installed in function libraries_load() (string 604 in file ***********\sites\all\modules\libraries\libraries.module). Screen shot : http://snag.gy/9dUeG.jpg

m4tlch’s picture

m4tlch’s picture

Well, this error appeared, because I've patched module like this

foreach ($directories as $dir) {
    if (file_exists($dir)) {
      $files = array_merge($files, file_scan_directory($dir, '@^[a-z0-9._-]+\.libraries\.info$@', array(
        'key' => 'name',
        'recurse' => TRUE,

in reason to keep my library files in order. So, it might be considered as false alarm. Sorry.

sun’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

...which also means that the statement in #2 was entirely bogus, because the error message states something completely different.

#1 explained why the code is using CSS_DEFAULT.

Punk_UnDeaD’s picture

Category: bug » feature
Status: Closed (works as designed) » Needs work
  $elements['#attached']['libraries_load'][] = array('mgmapmarkermanager');
  $elements['#attached']['js'][] = drupal_get_path('module', 'hotel_show') . '/hotel_show.direction.js';

hotel_show.direction.js use mgmapmarkermanager

how to attach in this case?

tstoeckler’s picture

Category: feature » bug
Status: Needs work » Closed (works as designed)

Re Punk_UnDeaD:
Please open a new issue if you have any problems with this module. Your specific problem sounds more like a support request, though, which is better handled in the forums. Thanks!