Answer the question
In order to leave comments, you need to log in
How to fix twig template rendering error (Symfony 2.4.8)?
Hello. Installed Symfony 2.4.8 on Ubuntu 16.04, attached MySQL database. When navigating to the /web/app_dev.php/ site, a Twig template renderer error appears (below):
An exception has been thrown during the rendering of a template ("An exception occurred while executing 'SELECT t0.id AS id1, t0.title AS title2, t0.address AS address3, t0.phone AS phone4, t0.category AS category5, t0.fax AS fax6, t0.worktime AS worktime7, t0.worktime_from AS worktime_from8, t0.worktime_to AS worktime_to9, t0.city AS city10, t0.email AS email11, t0.gps AS gps12, t0.map_center AS map_center13, t0.skype AS skype14, t0.createdAt AS createdAt15, t0.updatedAt AS updatedAt16 FROM Branch t0':
SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.category' in 'field list'") in /var/www/html/symfony/src/Avterra/MainBundle/Resources/views/base.html.twig at line 141.
500 Internal Server Error - Twig_Error_Runtime
2 linked Exceptions: DBALException » PDOException »
{% render(controller('AvterraMainBundle:Default:city')) %}
Answer the question
In order to leave comments, you need to log in
I don’t quite understand where does twig come into play?!
SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.category' in 'field list'")
update the database, you don't have a column category
in the table
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question