Commit causing this issue

Using a git bisect, this regression has been introduced with #2223885: Detect standalone hook_[pre]process_THEME_HOOK__SUGGESTION implementations

Pre-requisites to reproduce

Use another theme engine such as Twig (https://www.drupal.org/project/tfd7), to install, follow instruction at http://makina-corpus.com/blog/metier/2015/howto-using-twig-in-drupal-7

Especially the part stating that bootstrap should be using the same theme engine due to a core bug:

/**
 * Implements hook_system_info_alter().
 */
function mymodule_system_info_alter(&$info, $file, $type) {
  // Tweak bootstrap so it would be considered as a twig-based theme.
  if ($type == 'theme' && $info['name'] == 'Bootstrap') {
    $info['engine'] = 'twig';
  }
}

The problem

Before this commit, the default templates (node.tpl.php, region.tpl.php) provided by their respective modules are picked up if they are not defined in your own theme, nor in bootstrap, meaning you have to override each template bootstrap was providing in your theme, hence this gist https://gist.github.com/SebCorbin/2297f50b79d1c676eb04

But after this commit, Drupal is looking for modules/system/region.tpl.twig instead of picking the default region.tpl.php.

Then I noted that all system templates are overriden in bootstrap. It seems you have put a huge amount of work in this and I don't know how to fix the usage of different template engines.
I can help provide a patch but would you prefer we try to fix this, or a workaround to deactivate this part of the code which rewrites the whole registry but breaks some concepts?

Comments

SebCorbin created an issue. See original summary.

markhalliwell’s picture

Category: Bug report » Feature request
Priority: Major » Normal
Status: Active » Closed (works as designed)
Related issues: +#2512368: Support Twig engine in 7.x

The theme registry alterations are quite complex in 7.x-3.x and meant to work with core's PHPTemplate engine. I'm not entirely sure what that issue broke exactly either since this project does not actively "support" the Twig engine in 7.x-3.x (which is why this and the related issue are really a feature request).

I'm sure we could certainly add support for this sometime in the future, which is why I'm closing this as a "works as designed" and pointing you to the issue I have previously already created. However, I will say that something like this really isn't the focus of this project at the moment.