0

When I try to use the search-function in the Sonata Admin Bundle I always get:

An exception has been thrown during the rendering of a template ("The query returned a row containing multiple columns. Change the query or use a different result function like getScalarResult().") in SonataAdminBundle:Core:search.html.twig at line 53.

NonUniqueResultException: The query returned a row containing multiple columns. Change the query or use a different result function like getScalarResult().

When I do the search in the productive environment I just get a result if the Admin-Class has no result:

e.g. for Countries (CountryAdmin Class): no result found

I am using sonata-project/admin-bundle (2.3.10)

I tried to reduce my admin-classes to a single one which is very basic - but still having this problems. Any ideas? Thanks...

Atreides78
  • 577
  • 1
  • 7
  • 22

1 Answers1

0

I had problem with getScalarResult() method, when i did groupBy into my Admin class in createQuery() method. Maybe it will help

https://groups.google.com/forum/#!topic/sonata-users/cBT09egDtuo

https://github.com/sonata-project/SonataDoctrineORMAdminBundle/issues/297

Ruslan
  • 1