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
Comment #2
Second Account CreditAttribution: Second Account commentedComment #3
willzyx CreditAttribution: willzyx commented@No Sssweat thanks for reporting.
What kind of Kint errors you see in the logs? please can you post the relevant log lines?
Comment #4
Second Account CreditAttribution: Second Account commentedadded the errors from the log.
Comment #5
willzyx CreditAttribution: willzyx commentedThe 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 :)
Comment #6
Second Account CreditAttribution: Second Account commentedI 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?Comment #7
Second Account CreditAttribution: Second Account commentedComment #8
willzyx CreditAttribution: willzyx commentedLooks 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
Comment #9
Second Account CreditAttribution: Second Account commented@willzyx Thanks for all your help on this. Lowering it from 7 to 5 did the trick!
Thx again!