I want to see what view field related stuff is available for my view.

I created a views-view-fields--frontpage--page-1.html.twig and I change my front page view so it display fields and not teaser.

Inside I put {{ kint(fields) }} but when I try load the frontpage all I get is blank page.

Looking at my logs, I see kint errors.

Notice: Undefined offset: 1 in Drupal\kint\Twig\KintExtension->kint() (line 82 of /var/www/drupal/modules/devel/kint/src/Twig/KintExtension.php).

and

Warning: file(/var/www/drupal/vendor/twig/twig/lib/Twig/Environment.php(403) : eval()'d code): failed to open stream: No such file or directory in Drupal\kint\Twig\KintExtension->kint() (line 78 of /var/www/drupal/modules/devel/kint/src/Twig/KintExtension.php).

Comments

No Sssweat created an issue. See original summary.

Second Account’s picture

Issue summary: View changes
willzyx’s picture

@No Sssweat thanks for reporting.
What kind of Kint errors you see in the logs? please can you post the relevant log lines?

Second Account’s picture

Issue summary: View changes

added the errors from the log.

willzyx’s picture

The issue was solved in #2731381: Warning: file(/vendor/twig/twig/lib/Twig/Environment.php(403) : eval()'d code): failed to open stream: No such file or directory. Install the latest dev version of devel, it should work properly :)

Second Account’s picture

I installed 8.x-1.x-dev tar.gz (219.96 KB) | zip (386.71 KB) 2016-Jul-01

and I still get the blank screen (WSOD) except this time when I look at the logs, no errors get logged :(

I can print fields like this {{ fields.field_name.content }} so why wouldn't{{ kint(fields) }} work?

Second Account’s picture

Issue summary: View changes
willzyx’s picture

Looks like an out of memory problem

As a workaround (until Kint will be configurable via UI see #2405179: Make dumper plugins (Kint, etc.) configurable) you can edit modules/devel/kint/kint/config.default.php and set $_kintSettings['maxLevels'] to a lower number (the default is 7) to try to reduce recursion and the memory needed for dumping variables.
Let me know if it works

Second Account’s picture

Status: Active » Closed (fixed)

@willzyx Thanks for all your help on this. Lowering it from 7 to 5 did the trick!

Thx again!