http://www.resourcesforlearning.co.nz/sitemap.xml

Exceptions

Attempted to call an undefined method named "getEntityActionManager" of class "Doctrine\Bundle\DoctrineBundle\Registry".
Did you mean to call e.g. "getEntityManager" or "getEntityManagers"?

Exception

Symfony\Component\Debug\Exception\ UndefinedMethodException

  1.      * @Route("/sitemap.xml")
  2.      * @Method("GET")
  3.      */
  4.     public function sitemapAction(Request $request
  5.     {
  6.         $em $this->getDoctrine()->getEntityActionManager();
  7.         
  8.         $urls = array();
  9.         $hostname $request->getHost();
  10.         
  11.         foreach ($em->getRepository('AppBundle:Page')->findAll() as $page) {
RoutingController->sitemapAction() in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 151)
  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);
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level', (string) 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) {
  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() in web/app.php (line 28)
  1. Debug::enable();
  2. $kernel = new AppKernel('dev'true);
  3. $kernel->loadClassCache();
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);
  8. //phpinfo();

Stack Trace

UndefinedMethodException

Symfony\Component\Debug\Exception\UndefinedMethodException:
Attempted to call an undefined method named "getEntityActionManager" of class "Doctrine\Bundle\DoctrineBundle\Registry".
Did you mean to call e.g. "getEntityManager" or "getEntityManagers"?

  at src/AppBundle/Controller/RoutingController.php:18
  at AppBundle\Controller\RoutingController->sitemapAction()
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (web/app.php:28)