CSS File nice_menus_default causes White Screen of Death when optimizing CSS files
| Project: | Nice Menus |
| Version: | 6.x-1.3 |
| Component: | CSS |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
When I clicked on 'Optimize CSS files' in the performance section of a Drupal site that I am working on, my site would get a White Screen of Death. After a lot of trying to figure out what is going on, the call where this would occur is with function drupal_load_stylesheet() on nice_menus_default.css. It seems to have trouble running preg_replace on the following part in the CSS file (part of the nice_menus documentation):
<ul id='nice-menu-x' class='nice-menu nice-menu-TYPE'>
<li id='menu-MID' class='menu-path-PATH'><a href='#'>This is a menu item</a></li>
<li class='menuparent menu-path-PATH'><a href='#'>A submenu</a>
<ul...><li...>...</li>
</ul>
</li>
...
</ul>While the documentation is necessary, removing it allows the site to run the CSS aggregation + optimization to run correctly. Perhaps the documentation can be written in a different way to that it is still friendly on the function?
As a secondary note, this same comment also affects the 5.x build of the module (the same fix resolves the issue).
The patch I am attaching removes the offending comments (though hopefully it can become better documentation).
| Attachment | Size |
|---|---|
| comment_removal.patch | 1.12 KB |
