Symfony Exception

FatalThrowableError

HTTP 500 Internal Server Error

Type error: Argument 1 passed to Sonata\DoctrineORMAdminBundle\Datagrid\ProxyQuery::entityJoin() must be of the type array, null given, called in /var/www/dominios/retirovoluntario/vendor/sonata-project/doctrine-orm-admin-bundle/src/Datagrid/ProxyQuery.php on line 174

Exception

Symfony\Component\Debug\Exception\ FatalThrowableError

  1.     public function getUniqueParameterId()
  2.     {
  3.         return $this->uniqueParameterId++;
  4.     }
  5.     public function entityJoin(array $associationMappings)
  6.     {
  7.         $alias current($this->queryBuilder->getRootAliases());
  8.         $newAlias 's';
  1.         return $query->execute($params$hydrationMode);
  2.     }
  3.     public function setSortBy($parentAssociationMappings$fieldMapping)
  4.     {
  5.         $alias $this->entityJoin($parentAssociationMappings);
  6.         $this->sortBy $alias.'.'.$fieldMapping['fieldName'];
  7.         return $this;
  8.     }
ProxyQuery->setSortBy(null, null) in vendor/sonata-project/admin-bundle/src/Datagrid/Datagrid.php (line 152)
  1.             if (!$this->values['_sort_by'] instanceof FieldDescriptionInterface) {
  2.                 throw new UnexpectedTypeException($this->values['_sort_by'], FieldDescriptionInterface::class);
  3.             }
  4.             if ($this->values['_sort_by']->isSortable()) {
  5.                 $this->query->setSortBy($this->values['_sort_by']->getSortParentAssociationMapping(), $this->values['_sort_by']->getSortFieldMapping());
  6.                 $this->query->setSortOrder(isset($this->values['_sort_order']) ? $this->values['_sort_order'] : null);
  7.             }
  8.         }
  9.         $maxPerPage 25;
  1.         return $this->query;
  2.     }
  3.     public function getForm()
  4.     {
  5.         $this->buildPager();
  6.         return $this->form;
  7.     }
  8. }
  1.         if ($listMode $request->get('_list_mode')) {
  2.             $this->admin->setListMode($listMode);
  3.         }
  4.         $datagrid $this->admin->getDatagrid();
  5.         $formView $datagrid->getForm()->createView();
  6.         // set the theme for the current Admin Form
  7.         $this->setFormTheme($formView$this->admin->getFilterTheme());
  8.         // NEXT_MAJOR: Remove this line and use commented line below it instead
  1.         $this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS$event);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response = \call_user_func_array($controller$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new GetResponseForControllerResultEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch(KernelEvents::VIEW$event);
HttpKernel->handleRaw(object(Request), 1) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 68)
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level'ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
HttpKernel->handle(object(Request), 1, true) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php (line 200)
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle(object(Request)) in web/app.php (line 19)
  1. //$kernel = new AppCache($kernel);
  2. // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
  3. //Request::enableHttpMethodParameterOverride();
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Logs

No log messages

Stack Trace

FatalThrowableError

Symfony\Component\Debug\Exception\FatalThrowableError:
Type error: Argument 1 passed to Sonata\DoctrineORMAdminBundle\Datagrid\ProxyQuery::entityJoin() must be of the type array, null given, called in /var/www/dominios/retirovoluntario/vendor/sonata-project/doctrine-orm-admin-bundle/src/Datagrid/ProxyQuery.php on line 174

  at vendor/sonata-project/doctrine-orm-admin-bundle/src/Datagrid/ProxyQuery.php:248
  at Sonata\DoctrineORMAdminBundle\Datagrid\ProxyQuery->entityJoin(null)
     (vendor/sonata-project/doctrine-orm-admin-bundle/src/Datagrid/ProxyQuery.php:174)
  at Sonata\DoctrineORMAdminBundle\Datagrid\ProxyQuery->setSortBy(null, null)
     (vendor/sonata-project/admin-bundle/src/Datagrid/Datagrid.php:152)
  at Sonata\AdminBundle\Datagrid\Datagrid->buildPager()
     (vendor/sonata-project/admin-bundle/src/Datagrid/Datagrid.php:262)
  at Sonata\AdminBundle\Datagrid\Datagrid->getForm()
     (vendor/sonata-project/admin-bundle/src/Controller/CRUDController.php:168)
  at Sonata\AdminBundle\Controller\CRUDController->listAction()
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/app.php:19)