Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Nemtecl on
Hello,
I'm new to Drupal. I tried to install the Devel module. Then I've activated "devel" and "devel kint". But if i put {{ kint(node) }} on my node.html.twig file, when I refresh my page, it's blank. There is no error in the console... I don't know what's the problem. Would anyone have an idea?
Comments
dump
Hello Nemtecl,
Have you try with dump().
Raj Laddha
cmsMinds
rajesh@cmsminds.com
Drupal Development - North Carolina
Enable Twig debugging
Before using
kint()
in twig template please enable twig debugging in services.yml file which is initially disabled.More detail please read this article. https://www.drupal.org/node/1906392
It worked with dump(). And
It worked with dump(). And twig debuging is enable. It work aswell if I try something like {{kint(url)}}. I think the request {{ kint(node) }} ask to many memory for my browser or my computer... Any settings to change in wamp?
memory_limit
Increase memory limit in your settings.php file.
Open sites/defaults/settings.php and write below code at end of file.
ini_set('memory_limit', '512M');
if 512 MB is not enough then increase it to 1024 MB.
Note: Do not forget to remove this line of code from settings.php before going to production server.
512 was enough ! it worked :D
512 was enough ! it worked :D Thanks !
Or use development settings
Instead of putting these settings in settings.php, enable local settings and put them there!
In sites/example.settings.local.php you'll find the instructions!
Obviously, the resulting settings.local.php shouldn't be moved across environments.
Hi mmjvb,
Hi mmjvb,
Thanks for good suggestion. :-)
Documentation: https://www
Documentation: https://www.drupal.org/docs/8/theming/twig/discovering-and-inspecting-va...