1

I faced to problem trying drupal console:

1) In documentation written (https://www.drupal.org/docs/8/theming/twig/debugging-compiled-twig-templates):

drupal site:mode de

But I haven't that command in a list of other commands when I attempt drupal list in a project root

2) Then when I put in settings.php or settings.local.php this:

$settings['cache']['bins']['render'] = 'cache.backend.null';
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';

I got Error...

The website encountered an unexpected error. Please try again later.
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "cache.backend.null". Did you mean one of these: "cache.backend.apcu", "cache.backend.php", "cache.backend.memory"? in Drupal\Component\DependencyInjection\Container->get() (line 157 of core/lib/Drupal/Component/DependencyInjection/Container.php).
Drupal\Component\DependencyInjection\Container->get('cache.backend.null') (Line: 83)
Drupal\Core\Cache\CacheFactory->get('render')
call_user_func_array(Array, Array) (Line: 254)
Drupal\Component\DependencyInjection\Container->createService(Array, 'cache.render') (Line: 177)
Drupal\Component\DependencyInjection\Container->get('cache.render', 1) (Line: 494)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 236)
Drupal\Component\DependencyInjection\Container->createService(Array, 'http_middleware.page_cache') (Line: 177)
Drupal\Component\DependencyInjection\Container->get('http_middleware.page_cache', 1) (Line: 494)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 236)
Drupal\Component\DependencyInjection\Container->createService(Array, 'http_middleware.reverse_proxy') (Line: 177)
Drupal\Component\DependencyInjection\Container->get('http_middleware.reverse_proxy', 1) (Line: 494)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 236)
Drupal\Component\DependencyInjection\Container->createService(Array, 'http_middleware.negotiation') (Line: 177)
Drupal\Component\DependencyInjection\Container->get('http_middleware.negotiation', 1) (Line: 494)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 236)
Drupal\Component\DependencyInjection\Container->createService(Array, 'http_kernel') (Line: 177)
Drupal\Component\DependencyInjection\Container->get('http_kernel') (Line: 1320)
Drupal\Core\DrupalKernel->getHttpKernel() (Line: 652)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

If someone resolved it please share)

2
  • Hello @igorpromen. Can you update your question with the actual error you're facing? Thanks! Feb 20, 2017 at 13:05
  • 1
    Hello, first is absence of command (site:mode) Second: edited in question
    – igorpromen
    Feb 20, 2017 at 13:55

1 Answer 1

2

1 It appears that there is no site:mode command in the latest drupal console (1.0.0-rc16), but instead site:maintenance (sma) (on/off) is available. Maybe they ditched site:mode at some point because site:maintenance made more sense in Drupal context.

2 Make sure you have this code in development.services.yml:

services:
  cache.backend.null:
    class: Drupal\Core\Cache\NullBackendFactory
2
  • thank you, I have to have read attentively the instructions in settings.php and settings.local.php before serfing on the internet)) but for the maintenance mode thanks a lot)
    – igorpromen
    Feb 20, 2017 at 14:48
  • turn on maintenance mode: $ drupal site:maintenance on
    – igorpromen
    Feb 20, 2017 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.