我在symfony 2.8:中得到了这个错误
3/3] Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("[Syntax Error] line 0, col 128: Error: Expected Literal, got 'ORDER'"). -
第33行是
{% if admin.datagrid.results|length > 0 %}
和
QueryException ::dqlError ('SELECT o FROM WorkSeoControlBundleEntityDomain o LEFT JOIN o.strategy s_strategy LEFT JOIN o.renderer s_renderer WHERE ORDER BY o.id ASC')
in vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php at line 448
欢迎使用SO.
您的WHERE
条件为空。移除或填充所需条件:(
SELECT o FROM WorkSeoControlBundleEntityDomain o LEFT JOIN o.strategy s_strategy LEFT JOIN o.renderer s_renderer ORDER BY o.id ASC
或
SELECT o FROM WorkSeoControlBundleEntityDomain o LEFT JOIN o.strategy s_strategy LEFT JOIN o.renderer s_renderer WHERE XXX=YYY ORDER BY o.id ASC
您只需要更改Repository类文件。删除where条件,因为它似乎是空的。