retlehs/roots — Issue #162: Child theme requires parent activation first to Work
Author: MatthewEppelsheimer
Created: 2011-11-01 20:25:17+00:00
State: open

Thanks for the good work on this, Ben! We're going to use Roots extensively in our client projects.

It took me about an hour to realize an issue I was troubleshooting while child theming was due to not having activated Roots first. The child-parent theme stack was assuming the existence of some objects that hadn't been created because the activation scripts , to run its setup scripts and set up some objects that the child-parent stack were depending on.

(I think the specific issue is beside the point, but could be wrong, so the issue was an "undefined object" error notice (with WP_DEBUG set to true) displaying in place of the primary_navigation menu. The notice referenced line 49 of roots/headers.php. This went away and menus behaved as expected after activating Roots and then activating the child.

I'd like to suggest adding a note about this little "gotcha" in the child theme documentation. Better still, because it would be less brittle, would be to trick the Roots activation functions into running when a child theme is activated.

I'd like to help and can work on a patch for this if it's helpful, but it'll be awhile before I can write something I'm suggesting. I'm learning fast, but still a WP / PHP newbie.