https://heavenwavesmedia.com/videos/index-7.html

Exceptions

Boab\CmsBundle\Repository\ContentRepository::findContentBySlug(): Return value must be of type Boab\CmsBundle\Entity\ContentInterface, null returned

Exception

TypeError

  1.             ->where('c.slug = :slug')
  2.             ->andWhere('c.status = :status')
  3.             ->setParameter('slug',$slug)
  4.             ->setParameter('status'Content::STATUS_PUBLISHED);
  5.         return $qb->getQuery()->getOneOrNullResult();
  6.     }
  7.     public function findContentByUserId($userId)
  8.     {
  9.         $qb $this->getContentQuery()
ContentRepository->findContentBySlug() in lib/boab/cms-bundle/src/Manager/AbstractContentType.php (line 72)
  1.         return $this->repository->findContentsByType($this->getEntityClass(), $page);
  2.     } 
  3.     public function getContent(Request $request): ?ContentInterface
  4.     {
  5.         return $this->repository->findContentBySlug($request->get('slug'));
  6.     }
  7.     public function getContentById($contentId): ?ContentInterface
  8.     {
  9.         return $this->repository->findContentById($contentId);
AbstractContentType->getContent() in lib/boab/cms-bundle/src/Manager/ContentTypeManager.php (line 103)
  1.         if(!$route instanceof RouteContentInterface){
  2.             throw new \Exception(sprintf('Your route must implements %s to call the method %s'RouteContentInterface::class, __METHOD__));
  3.         }
  4.         $typeManager $this->getType($route->getContentType());
  5.         return $typeManager->getContent($request);
  6.     } 
  7.     public function getContents(array $params)
  8.     {
  9.         return $this->contentRepository->findContents($params);
ContentTypeManager->getContent() in lib/boab/cms-bundle/src/Controller/ContentController.php (line 81)
  1.      * 
  2.      * @return void
  3.      */
  4.     public function showAction(Request $requestRouteInterface $routeDocument$contentTemplate)
  5.     {
  6.         $content $this->contentTypeManager->getContent($request);
  7.         if(!$content){
  8.             throw new NotFoundHttpException('Page not found');
  9.         }
  10.         $view $this->viewManager->load($contentTemplate);
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     public function handle(Request $requestint $type HttpKernelInterface::MAIN_REQUESTbool $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.     }
  1.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 35)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/home/u835281259/domains/heavenwavesmedia.com/siteFiles/vendor/autoload_runtime.php') in /home/u835281259/domains/heavenwavesmedia.com/public_html/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/siteFiles/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Stack Trace

TypeError
TypeError:
Boab\CmsBundle\Repository\ContentRepository::findContentBySlug(): Return value must be of type Boab\CmsBundle\Entity\ContentInterface, null returned

  at lib/boab/cms-bundle/src/Repository/ContentRepository.php:135
  at Boab\CmsBundle\Repository\ContentRepository->findContentBySlug()
     (lib/boab/cms-bundle/src/Manager/AbstractContentType.php:72)
  at Boab\CmsBundle\Manager\AbstractContentType->getContent()
     (lib/boab/cms-bundle/src/Manager/ContentTypeManager.php:103)
  at Boab\CmsBundle\Manager\ContentTypeManager->getContent()
     (lib/boab/cms-bundle/src/Controller/ContentController.php:81)
  at Boab\CmsBundle\Controller\ContentController->showAction()
     (vendor/symfony/http-kernel/HttpKernel.php:152)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:74)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:35)
  at require_once('/home/u835281259/domains/heavenwavesmedia.com/siteFiles/vendor/autoload_runtime.php')
     (/home/u835281259/domains/heavenwavesmedia.com/public_html/index.php:5)