I have memcache set up with two servers: Config looks like this.

$settings['cache']['default'] = 'cache.backend.memcache';
$settings['cache']['bins']['config'] = 'cache.backend.database';
$settings['memcache']['servers'] = [
  'x.x.x.x:11211' => 'default', // PRD 01
  'x.x.x.x:11211' => 'default' // PRD 02
];

After some period of time and a few cache clears, you cannot visit any admin pages and you receive these errors in the log.

Uncaught PHP Exception Twig_Error_Loader: "Template ".html.twig" is not defined (Drupal\\Core\\Template\\Loader\\ThemeRegistryLoader: Unable to find template .html.twig in the Drupal theme registry. at /core/themes/seven/templates/page.html.twig line 44

The code there is:

{{ page.header }}

I think there is something to do with there being more than one memcache server.

I don't see this error locally where memcache is not installed.
I do not see this on dev where there is one memcache server.
I do not see this on production when disabling memcache.

Comments

nicxvan created an issue. See original summary.

nghai’s picture

@nicxvan : I am also facing the same issue.

on local, when memcache is OFF no problem is there.
on dev, where memcache is ON the admin theme is missing throwing the same error.

Did you find any solution ?

Thanks

webchick’s picture

catch’s picture

It would be great if people experiencing this issue could retest with the latest memcache release: https://www.drupal.org/project/memcache/releases/8.x-2.0-beta1

nicxvan’s picture

Sorry, I can't test, I removed memcache from the site that was experiencing it, and it did not happen locally.

jeremy’s picture

Assigned: Unassigned » bdragon
nghai’s picture

Hello @catch

I tested the latest version of the module with Drupal 8.5.6 version.

And I confirmed that the problem is no more there, backend is working all fine with cache clear from frontend theme.

catch’s picture

Status: Active » Fixed

Thanks for retesting this! Marking fixed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.