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.

Files: 
CommentFileSizeAuthor
#3 omega-libraries_missing_name-1456504-3.patch539 bytesGuyPaddock
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es). View
#1 1456504_libraries_missing_name.patch535 bytesGuyPaddock
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1456504_libraries_missing_name.patch. Unable to apply patch. See the log in the details link for more information. View

Comments

GuyPaddock’s picture

Status: Active » Needs review
FileSize
535 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1456504_libraries_missing_name.patch. Unable to apply patch. See the log in the details link for more information. View

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

FileSize
539 bytes
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es). View

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