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

cmsMinds’s picture

Hello Nemtecl,
Have you try with dump().

PHP OOPS’s picture

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

Nemtecl’s picture

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?

PHP OOPS’s picture

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.

Nemtecl’s picture

512 was enough ! it worked :D Thanks !

mmjvb’s picture

Note: Do not forget to remove this line of code from settings.php before going to production server.

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.

PHP OOPS’s picture

Hi mmjvb,

Thanks for good suggestion. :-)