-1

I got this error in 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'").  -

line 33 is

    {% if admin.datagrid.results|length > 0 %}

and

 QueryException ::dqlError ('SELECT o FROM Work\SeoControlBundle\Entity\Domain 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
Mike
  • 4,041
  • 6
  • 20
  • 37
Isabelle
  • 41
  • 1
  • 7

2 Answers2

1

Welcome on SO.

Your WHERE condition is empty. Remove it or fill it with needed conditions :)

SELECT o FROM Work\SeoControlBundle\Entity\Domain o LEFT JOIN o.strategy s_strategy LEFT JOIN o.renderer s_renderer ORDER BY o.id ASC

or

SELECT o FROM Work\SeoControlBundle\Entity\Domain o LEFT JOIN o.strategy s_strategy LEFT JOIN o.renderer s_renderer WHERE XXX=YYY ORDER BY o.id ASC
André DS
  • 1,823
  • 1
  • 14
  • 24
1

You just have to change your Repository class files. Remove the where condition because it seems that this is empty.

JessGabriel
  • 1,062
  • 9
  • 18