Download & Extend

View / Recreate feature ignores admin theme

Project:Features
Version:7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

Can't figure out why, but going to /admin/structure/features/FOO loads in the site default theme, not the admin theme as expected.

Something to do with the custom theme template?

Comments

#1

I'm on the latest dev version of Features, and none of the patches will correct this error for me.

#2

Triggering this bug requires having something call menu_get_item() in hook_custom_theme (or possibly hook_init -- something before full boostrap). Domain_theme from Domain was the module that made me look into this.

This problem occurs because features_load is invoked by menu_get_item() since the feature object is the menu argument. Inside the feature_load chain is system_rebuild_module_info. If a module calls menu_get_item in a pre-bootstrap hook like custom_theme (which domain theme does), it will attempt to load the feature, which triggers the module info rebuild. At least the field module, and possibly many others, call theme functions or functions that depend on theme calls (i.e. l()) during the module rebuild. Since theme initialization hasn't happened, the theme gets pre-initialized as the default regardless of what custom_theme hook invokes set.

I have no idea whether to blame domain for calling menu_get_item before initialization, features for calling system_rebuild_module_info as part of an entity load function or core for allowing API calls to exist that can't safely be called from hooks that core also provides pre bootstrap.

#3

Hm. That sounds like a bug in Features still.

#4

Status:active» closed (duplicate)

We fixed this over in DA.

nobody click here