Whenever IMCE is opened, I get recurring errors along these lines until I shut the IMCE browser-

Notice: Undefined index: group in drupal_sort_css_js() (line 3132 of /var/www/core-development/includes/common.inc).
Notice: Undefined index: every_page in drupal_sort_css_js() (line 3142 of /var/www/core-development/includes/common.inc).
Notice: Undefined index: weight in drupal_sort_css_js() (line 3146 of /var/www/core-development/includes/common.inc).
Warning: uasort(): Array was modified by the user comparison function in uasort() (line 4311 of /var/www/core-development/includes/common.inc).
Notice: Undefined index: type in drupal_get_js() (line 4340 of /var/www/core-development/includes/common.inc).

These errors pop up over the IMCE browser, rendering it difficult to use. Anyone else seeing this after upgrading to IMCE 1.8?

Comments

jamessw’s picture

Status: Active » Closed (works as designed)

This was due to my use of hook_js_alter. I needed to check that the js already existed in the $javascript variable before changing its scope. IMCE did not load that javascript, so instead of changing an existing array, I created an incomplete array. My error, not IMCE.

neta.alon’s picture

I've also experienced it, your solution helped me a lot!

My error was referring to a script that did not exist.

This was my function:

function MY_THEMES_NAME_js_alter(&$javascript) {
  // Move jQuery to top of page
  $javascript['sites/all/modules/jquery_update/replace/jquery/1.7/jquery.min.js']['scope'] = 'head_scripts';
}

Turned out for some reason jQuery was getting served not minified, so instead of jquery.min.js I had jquery.js.
I was using jQuery Update module. Went to configuration and changed from "Development Mode" to "Production Mode".

Fixed!