2017-01-02 20 views

回答

0

的問題是在我的sites/development.services.yml文件中。 parameters:被定義了兩次。該文件應該是這樣的:

# Local development services. 
# 
# To activate this feature, follow the instructions at the top of the 
# 'example.settings.local.php' file, which sits next to this file. 
services: 
    cache.backend.null: 
    class: Drupal\Core\Cache\NullBackendFactory 
parameters: 
    twig.config: 
    debug: true 
    auto_reload: true 
    cache: false 
0

嘗試添加以下到您的development.services.yml下的 '服務':

cache.backend.memory: 
class: Drupal\Core\Cache\MemoryBackendFactory 

和這些行添加到您的settings.local.php:

$config['system.performance']['css']['gzip'] = FALSE; 
$config['system.performance']['js']['gzip'] = FALSE; 
$config['system.performance']['response']['gzip'] = FALSE; 
+0

我只看到在Drupal中手動緩存後的更改。我development.services.yml文件看起來像現在這種權利: 「參數: http.response.debug_cacheability_headers:真 服務: cache.backend.null: 類:Drupal的\核心\緩存\ NullBackendFactory cache.backend。內存: 類:Drupal的\核心\緩存\ MemoryBackendFactory 參數: twig.config: 調試:真 auto_reload:真 緩存:假」 –

+0

你確定settings.local.php正確包括在內?嘗試放置一個模具;或文件中的某些內容用於測試目的。 – Elendas