I have been messing around with Drupal 8 and seen that in the status report it suggested I should add the Twig C Extension, after adding it I begun to get the following error when using Kint in a theme template file.
Warning: file(/Users/jafacakes2011/Sites/site/recipe-hub/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 /Users/jafacakes2011/Sites/site/recipe-hub/modules/contrib/devel/kint/src/Twig/KintExtension.php).
I Installed PHP and Twig using homebrew: brew install php56 php56-twig php56-mcrypt php56-opcache
You can see in the image below that twig is on my php server.
The error lead me to believe that it was a permissions issue, but all permissions seemed ok in the vendor twig folder.
Overriding templatesLocate the template you want to override. Copy the template file from its core location into your theme folder. Rename the template according to the naming conventions in order to target a more specific subset of areas where the template is used. Modify the template according to your wish.
this seems to be a kint twig extension issues (see this issue in the devel issues queue https://www.drupal.org/node/2731381)
As workaround you can:
go to devel settings page and set kint as the default dumper
use {{ devel_dump() }}
instead of {{ kint() }}
for debug variables in twig template
{{ devel_dump() }}
not have all the features offered by the kint twig extension but work well and no suffers from this issue.. the output produced by the devel twig extension is almost equal
What fixed this for me was going to '/admin/config/development/devel' and changing the Error handlers from "Standard Drupal" to "Kint backtrace above the rendered page." I also set the Variables Dumper to Kint for a nicer output.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With