Posted by GuyPaddock on February 25, 2012 at 7:10pm
4 followers
| Project: | Omega |
| Version: | 7.x-3.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | himerus |
| Status: | patch (to be ported) |
Issue Summary
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] = -20The 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] = -20However, the code should be able to handle this small oversight without the notice.
Comments
#1
The attached patch corrects this issue.
#2
The last submitted patch, 1456504_libraries_missing_name.patch, failed testing.
#3
Corrected patch. Updated to new D7 standard.
#4
Setting to NR.
#5
Can be included in the 3.2 release
#6
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