When "Rebuild Theme Registry on every page" is enabled, no pages will load. You will instead get an error that the url() function is undefined.

I don't have time to submit a patch at the moment, but the relevant line to replace is line 27 of zen-internals/theme-registry.inc.

This will get things to load:
drupal_set_message(t('For easier theme development, the theme registry is being rebuilt on every page request. It is extremely important to turn off this feature on production websites.', array('!link' => \Drupal\Core\Url::fromUri('base://admin/appearance/settings/' . $active_theme))), 'warning', FALSE);

Note that the !link placeholder still needs to be replaced. I'll do something about that if I find time to come back and create the patch before someone else gets there.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rhuffstedtler created an issue. See original summary.

rhuffstedtler’s picture

Regarding the !link placeholder, apparently the format string for that kind of placeholder changed, and it should now be :link rather than !link. Similar change needs to be made in theme-settings.php

rhuffstedtler’s picture

This patch should get it.

rhuffstedtler’s picture

Status: Active » Needs review
caschbre’s picture

@rob... I think you want to use Url::fromRoute instead of Url::fromUri to generate the link from a Drupal route.

drupal_set_message(t('For easier theme development, the theme registry is being rebuilt on every page request. It is <em>extremely</em> important to <a href=":link">turn off this feature</a> on production websites.', array(':link' => \Drupal\Core\Url::fromRoute('system.theme_settings_theme', ['theme' => $active_theme]))), 'warning', FALSE);

I haven't tested that code yet though.

JohnAlbin’s picture

Version: 8.x-7.0-alpha14 » 8.x-7.x-dev
pakmanlh’s picture

FileSize
1.19 KB
2.28 KB

I updated the patch applying the fromRoute idea from #5 and replacing the deprecated drupal_set_message function by the addMessage one.

hitfactory’s picture

Confirming the patch in #7 resolves the issue. Thanks, @pakmanlh.