When a theme based on Omega is used that declares libraries without giving them a human-friendly name, the following PHP notice is displayed after performing a cache clear:

Notice: Undefined index: name in alpha_retrieve_libraries() (line 857 of themes/omega/alpha/includes/alpha.inc).

An example of an info file snippet (in the sub-theme) that will cause this issue is as follows:

libraries[omega_formalize][css][0][file] = formalize.css
libraries[omega_formalize][css][0][options][weight] = -20

The issue can be fixed by adding the name to the sub-theme info file (borrowed from the example in themes/omega/omega/omega.info):

libraries[omega_formalize][name] = Formalize
libraries[omega_formalize][css][0][file] = formalize.css
libraries[omega_formalize][css][0][options][weight] = -20

However, the code should be able to handle this small oversight without the notice.

Members fund testing for the Drupal project. Drupal Association Learn more


GuyPaddock’s picture

Status: Active » Needs review
535 bytes

The attached patch corrects this issue.

Status: Needs review » Needs work

The last submitted patch, 1456504_libraries_missing_name.patch, failed testing.

GuyPaddock’s picture

Corrected patch. Updated to new D7 standard.

GuyPaddock’s picture

Status: Needs work » Needs review

Setting to NR.

Cellar Door’s picture

Status: Needs review » Patch (to be ported)

Can be included in the 3.2 release

Cellar Door’s picture

Assigned: GuyPaddock » himerus

I added $name instead of a blank '' which will take the name and insert it as a fallback incase so the readout is clear. Also updated the css declaration on line 827 for the same

steinmb’s picture

Assigned: himerus » Unassigned
Priority: Minor » Normal
Issue summary: View changes
Status: Patch (to be ported) » Needs review