Circular dependency in theme .info data causes WSOD
JohnAlbin - June 18, 2009 - 07:54
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | theme system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
There are already parts of the theme system that try to prevent against circular dependencies amongst themes. See http://api.drupal.org/api/function/system_find_base_theme/7
Unfortunately, we don't carry those checks to other parts of the system. For example, admin/build/themes allows you to enable a theme with a circular dependency. And if you do so, the system will enter an infinite loop and present the admin user with a WSOD.
Now, there are 2 possible ways a circular dependency could occur.
- Accident by theme developer. I don't think this case justifies adding code to core to prevent a developer from making a dumb mistake. (just listing this for completeness.)
- Themes downloaded from different sources. If someone downloads a theme from d.o. that depends on Zen, but also downloads a Zen theme from a 3rd party site that depends on something else, an unwitting admin could create a problem. This is pretty unlikely, but the fix is pretty straight-forward.

#1
Depends on #489762: Add theme lineage to .info cache (and prevent WSOD on admin/build/themes)
#2
#489762: Add theme lineage to .info cache (and prevent WSOD on admin/build/themes) has been committed.