Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I get this twice on every page when my Aurora sub-theme is active.
Notice: Undefined index: type in aurora_get_js_old() (line 143 of /data/www/development/d7/sfera/profiles/sfera/themes/aurora/includes/scripts.inc
Comments
Comment #1
marcvangendI had the same message (using 2.7) and a similar one saying "Notice: Undefined index: group in aurora_get_js_old() (line 61 of ...", but after a few tries and cache-clears it disappeared and didn't come back. Weird.
Comment #2
marcvangendFound it!
In my case, this was caused by the fact that the modernizr module was installed, but the actual modernizr js was not present.
This in itself would not be a problem, but aurora_js_alter() calls modernizr_get_path() without checking if the return value is something meaningful. If the path to modernizr.js is not found, modernizr_get_path() returns
null
and aurora_js_alter() adds a bogus item to the javascripts array.Comment #3
iamcarrico CreditAttribution: iamcarrico commentedWhoop! Thats weird. I will take a look at a fix for it. Might even poke the modernizr module maintainer for some better code. :-)
Comment #4
Elijah LynnAgreed, I am thinking the Modernizr code could fail more gracefully and maybe put a drupal_set_message() up saying something helpful.
Comment #5
Elijah LynnCrosslinking similar issue - http://drupal.org/node/1868202
Comment #6
iamcarrico CreditAttribution: iamcarrico commentedThis issue doesn't matter anymore as the Modernizr implemented the force_header tag. The aurora_js_alter has been taken out of future versions