From 93b8415397517741a3ab83ff3ffd07a80753ef36 Mon Sep 17 00:00:00 2001 From: Janne Koponen Date: Thu, 11 Oct 2018 11:22:40 +0300 Subject: [PATCH 1/2] Check if module is enabled from core.extension.yml instead of class_exists. Resolves #304 --- drupal/web/sites/default/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drupal/web/sites/default/settings.php b/drupal/web/sites/default/settings.php index 36c81bda..6eba80e0 100755 --- a/drupal/web/sites/default/settings.php +++ b/drupal/web/sites/default/settings.php @@ -116,7 +116,7 @@ */ if (!drupal_installation_attempted() && extension_loaded('memcached') && class_exists('Memcached')) { // Define memcache settings only if memcache module enabled. - if (class_exists(MemcacheBackendFactory::class)) { + if (strpos(file_get_contents(getcwd().'/../sync/core.extension.yml'), 'memcache') !== false) { $settings['memcache']['extension'] = 'Memcached'; $settings['memcache']['bins'] = ['default' => 'default']; $settings['memcache']['key_prefix'] = ''; From 56efa64831fb8b5be1f877a03a77fa5f6a96194f Mon Sep 17 00:00:00 2001 From: Janne Koponen Date: Thu, 11 Oct 2018 11:33:08 +0300 Subject: [PATCH 2/2] Make memcache module check more explicit. --- drupal/web/sites/default/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drupal/web/sites/default/settings.php b/drupal/web/sites/default/settings.php index 6eba80e0..f3e80426 100755 --- a/drupal/web/sites/default/settings.php +++ b/drupal/web/sites/default/settings.php @@ -116,7 +116,7 @@ */ if (!drupal_installation_attempted() && extension_loaded('memcached') && class_exists('Memcached')) { // Define memcache settings only if memcache module enabled. - if (strpos(file_get_contents(getcwd().'/../sync/core.extension.yml'), 'memcache') !== false) { + if (strpos(file_get_contents(getcwd().'/../sync/core.extension.yml'), 'memcache: 0') !== FALSE) { $settings['memcache']['extension'] = 'Memcached'; $settings['memcache']['bins'] = ['default' => 'default']; $settings['memcache']['key_prefix'] = '';