Sage template wrapping and third-party search plugins

I’m testing out the plugin BuddyPress Global Search in order to get search capability for my WP/BP site. It works fine on most themes except for my Sage-based theme. On my Sage-based theme, the search results page is returned with no other templating–i.e. no head, no header, and no footer. This means that the CSS/JS for the search results page doesn’t load, which gives it a pretty strange look. I think this has something to do with a conflict in the way Sage is hijacking templates and how BPGS is hijacking the search template.

Does anyone have any ideas about how to get Sage to play nice with plugins that might rewrite or inject content into certain templates (in this case, search.php)?

Do you have WP_DEBUG turned on? That could give you a hint.

I’m assuming that BuddyPress does something similar to Woocommerce and it’s templates, so perhaps this would be helpful: https://roots.io/using-woocommerce-with-sage/

Yep, but the debug messages aren’t of much help with this one.

I managed to get this mostly to work by writing a template called buddypress-global-search.php that contains all the template imports, like get_template_part( 'templates/head' );. But to be really DRY it’d be nice if this weren’t necessary. It looks like BPGS was loading page.php, but it assumed that Sage’s page.php would have things like headers and footers, and so it didn’t display them.