-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Twig debug command is becoming flaky, sometimes somehow inoperable, or is misleading? #6055
Comments
I am also seeing this. These Drush commands used to allow enabling and disabling Twig debugging, but now do nothing:
From Disabling and debugging caching > Enabling Twig debugging via Drush. I need to activate it via GUI at /admin/config/development/settings. System Configuration
|
Same issue as gitressa, mlncn. The Drush commands to enable / disable twig debug are not working, either when using:
or
Disabling / enabling via the UI does work (/admin/config/development/settings). System Configuration
|
This commands no longer works for Drupal v10.3 and above. In version 10.3, the storage for these settings was changed from state to keyValue. see https://www.drupal.org/project/drupal/issues/3437162 and https://www.drupal.org/node/3438802 |
You can set it with eval in v10.3 above, see https://drupal.stackexchange.com/a/316894/72678 |
Thanks for clearing this up @hudri, I guess these files needs a PR then (maybe more?) for |
I updated the documentation at https://www.drupal.org/docs/develop/development-tools/disabling-and-debugging-caching. Thanks again @hudri! |
Describe the bug
Twig debug output should start showing when Drush's twig:debug command is run.
To Reproduce
What did you do?
Ran
drush twig:debug on
and twig debug output did not come on.Tried turning it on and off, removing and adding services.yml files, and pretty much everything to no avail— except looking in Drupal's UI, where turning twig debugging on at
/admin/config/development/settings
worked fine.Expected behavior
Pretty much no matter what other settings are in place, running
drush twig:debug on
should begin showing twig template information in HTML comments— or at least indicate an error of why it cannot.Actual behavior
Nothing but a message " [OK] Enabled twig debug. " which was not actually true.
Workaround
Go to
/admin/config/development/settings
and enable "Twig development mode" and inside that "Twig debug mode" and "Disable Twig cache".Twig debugging / caching settings added to administrative user interface | Drupal.org
System Configuration
Additional information
This site installs from config, in case that could be a factor somehow.
The text was updated successfully, but these errors were encountered: