0

I set up the demo of symfony ('https://symfony.com/download'). I browse the app in my browser and I receive that error in the log:

CRITICAL - Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("An exception occured in driver: could not find driver") in "blog/index.html.twig" at line 6." at /usr/local/bin/symfony-project/symfony_demo/var/cache/dev/classes.php line 7607

The line 7607 of the file:

catch (Exception $e) {
throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getTemplateName(), $e);
}

I tried to install php-curl because also i cannot log in to the backend of the app(Symfony Demo - unable to sign in). It didnt fix the problem.

Maybe I should try (What happened after pushing my local repository to github?). I dont know if in my case I can clear the cache to fix it and how to do it.

Here is the index.html.twig :

{% block main %}
    {% for post in posts %}
    <article class="post">
        <h2><a href="{{ path('blog_post', { slug: post.slug }) }}"> {{ post.title }} </a></h2>
        {{ post.summary|md2html }}
    </article>
    {% else %}
        <div class="well">{{ 'post.no_posts_found'|trans }}</div>
    {% endfor %}
    <div class="navigation text-center"> {{ pagerfanta(posts, 'twitter_bootstrap3_translated', { routeName: 'blog_index_paginated' }) }} </div>
{% endblock %}
Skatt
  • 372
  • 3
  • 10
  • Welcome to Stack Overflow! The first problem come from the line 6 in blog/index.html. Please provide us this file and [Minimal, Complete, and Verifiable](http://stackoverflow.com/help/mcve) example. – Alexandre Tranchant Dec 07 '16 at 12:38
  • /*line 6*/ {% for post in posts %} {% else %}
    {{ 'post.no_posts_found'|trans }}
    {% endfor %} {% endblock %}
    – Skatt Dec 07 '16 at 13:44
  • I edited your post with your code. It will appears in a few minutes. – Alexandre Tranchant Dec 07 '16 at 13:46

0 Answers0