https://newchristianbiblestudy.org/app_dev.php/it/swedenborg/?l=205%27%5B0%5D

Exceptions

An exception occurred while executing 'select * from (SELECT distinct on (w.id) w.id as work_id, t.id as translation_id, t.url as translation_url, t.translatedtitle AS title, t.description, case when t.language_id = 202 then 1 else 2 end as lang_order, case when t.islanguagedefault then 1 else 2 end as default_order, w.swedenborgtype, wt.ordering as type_order FROM expositiontranslation t, expositionworktype wt, expositionwork w WHERE w.swedenborgtype IS NOT NULL and t.work_id=w.id and w.swedenborgtype = wt.name and t.language_id = 205'[0] and w.swedenborgtype not in ('scientific', 'transitional') and t.type_id = 1 and w.ispublic AND t.ispublic and t.url is not null and t.url <> '' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title':

SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "'[0] and w.swedenborgtype not in ('"
LINE 1: ...w.swedenborgtype = wt.name and t.language_id = 205'[0] and w...
^

Exceptions 3

Doctrine\DBAL\Exception\ SyntaxErrorException

  1.             case '23505':
  2.                 return new Exception\UniqueConstraintViolationException($message$exception);
  3.             case '42601':
  4.                 return new Exception\SyntaxErrorException($message$exception);
  5.             case '42702':
  6.                 return new Exception\NonUniqueFieldNameException($message$exception);
  7.             case '42703':
AbstractPostgreSQLDriver->convertException('An exception occurred while executing \'select * from (SELECT distinct on (w.id) w.id as work_id, t.id as translation_id, t.url as translation_url, t.translatedtitle AS title, t.description, case when t.language_id = 202 then 1 else 2 end as lang_order, case when t.islanguagedefault then 1 else 2 end as default_order, w.swedenborgtype, wt.ordering as type_order FROM expositiontranslation t, expositionworktype wt, expositionwork w WHERE w.swedenborgtype IS NOT NULL and t.work_id=w.id and w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w.swedenborgtype not in (\'scientific\', \'transitional\') and t.type_id = 1 and w.ispublic AND t.ispublic and t.url is not null and t.url <> \'\' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title\':SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "\'[0] and w.swedenborgtype not in (\'"LINE 1: ...w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w... ^', object(PDOException)) in vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php (line 169)
  1.     {
  2.         if ($driverEx instanceof DriverException) {
  3.             return $driverEx;
  4.         }
  5.         if ($driver instanceof ExceptionConverterDriver && $driverEx instanceof DriverExceptionInterface) {
  6.             return $driver->convertException($msg$driverEx);
  7.         }
  8.         return new self($msg0$driverEx);
  9.     }
DBALException::wrapException(object(Driver), object(PDOException), 'An exception occurred while executing \'select * from (SELECT distinct on (w.id) w.id as work_id, t.id as translation_id, t.url as translation_url, t.translatedtitle AS title, t.description, case when t.language_id = 202 then 1 else 2 end as lang_order, case when t.islanguagedefault then 1 else 2 end as default_order, w.swedenborgtype, wt.ordering as type_order FROM expositiontranslation t, expositionworktype wt, expositionwork w WHERE w.swedenborgtype IS NOT NULL and t.work_id=w.id and w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w.swedenborgtype not in (\'scientific\', \'transitional\') and t.type_id = 1 and w.ispublic AND t.ispublic and t.url is not null and t.url <> \'\' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title\':SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "\'[0] and w.swedenborgtype not in (\'"LINE 1: ...w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w... ^') in vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php (line 145)
  1.         if ($params) {
  2.             $msg .= ' with params ' self::formatParameters($params);
  3.         }
  4.         $msg .= ":\n\n" $driverEx->getMessage();
  5.         return static::wrapException($driver$driverEx$msg);
  6.     }
  7.     /**
  8.      * @param Exception $driverEx
  9.      *
DBALException::driverExceptionDuringQuery(object(Driver), object(PDOException), 'select * from (SELECT distinct on (w.id) w.id as work_id, t.id as translation_id, t.url as translation_url, t.translatedtitle AS title, t.description, case when t.language_id = 202 then 1 else 2 end as lang_order, case when t.islanguagedefault then 1 else 2 end as default_order, w.swedenborgtype, wt.ordering as type_order FROM expositiontranslation t, expositionworktype wt, expositionwork w WHERE w.swedenborgtype IS NOT NULL and t.work_id=w.id and w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w.swedenborgtype not in (\'scientific\', \'transitional\') and t.type_id = 1 and w.ispublic AND t.ispublic and t.url is not null and t.url <> \'\' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title', array()) in vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php (line 162)
  1.             }
  2.             throw DBALException::driverExceptionDuringQuery(
  3.                 $this->conn->getDriver(),
  4.                 $ex,
  5.                 $this->sql,
  6.                 $this->conn->resolveParams($this->params$this->types)
  7.             );
  8.         }
  9.         if ($logger) {
  10.             $logger->stopQuery();
Statement->execute() in src/NCBS/WebsiteBundle/Controller/NCBSWController.php (line 241)
  1.     }
  2.     
  3.     function getNativeQueryResults($sql)
  4.     {
  5.         $query $this->getManager()->getConnection()->prepare($sql);
  6.         $query->execute();
  7.         return $query->fetchAll();
  8.     }
  9.         
  10.     function getExplainedStoryList($locale$nStoryId=null)
  11.     {
NCBSWController->getNativeQueryResults('select * from (SELECT distinct on (w.id) w.id as work_id, t.id as translation_id, t.url as translation_url, t.translatedtitle AS title, t.description, case when t.language_id = 202 then 1 else 2 end as lang_order, case when t.islanguagedefault then 1 else 2 end as default_order, w.swedenborgtype, wt.ordering as type_order FROM expositiontranslation t, expositionworktype wt, expositionwork w WHERE w.swedenborgtype IS NOT NULL and t.work_id=w.id and w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w.swedenborgtype not in (\'scientific\', \'transitional\') and t.type_id = 1 and w.ispublic AND t.ispublic and t.url is not null and t.url <> \'\' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title') in src/NCBS/WebsiteBundle/Controller/NCBSWController.php (line 4946)
  1.        $sSql .= " and w.swedenborgtype not in ('scientific', 'transitional')";        
  2.                 
  3.        $sSql .= " and t.type_id = " $this->TRANSLATION_TYPE_ID_TEXT " and w.ispublic AND t.ispublic and t.url is not null and t.url <> '' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title";
  4.    //  echo $sSql."<br>";    
  5.          $aRet = array();   
  6.         $aTemp $this->getNativeQueryResults($sSql);  
  7.            $nLen count($aTemp);           
  8.            foreach($aTemp as $temp)
  9.            {
  10.                $aRet[$temp['swedenborgtype']][] = $temp;
  11.            }
NCBSWController->getSwedenborgWorks(object(Request), 202, '205\'[0]') in src/NCBS/WebsiteBundle/Controller/ExpositionController.php (line 152)
  1.         $nLocaleLanguageID $this->getLanguageIDByShortCode($locale);
  2.         
  3.         $nSelectedLangID $request->query->get('l');
  4.         
  5.         return $this->renderView('index/swedenborg', array(          
  6.             'works' => $this->getSwedenborgWorks($request$nLocaleLanguageID$nSelectedLangID),
  7.             'works2' => $this->getSwedenborgWorks2($request$nLocaleLanguageID$nSelectedLangID),
  8.             'languages' => $this->getSwedenborgWorkLanguages($request),
  9.             'selected_language_id' => $nSelectedLangID,
  10.             'search_domain' => 'w'
  11.         ));
ExpositionController->swedenborgIndexAction(object(Request)) 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);
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_dev.php (line 41)
  1. $kernel->loadClassCache();
  2. error_log("0.3 ClassCache loaded ");
  3. $request Request::createFromGlobals();
  4. $response $kernel->handle($request);
  5. $response->send();
  6. $kernel->terminate($request$response);

Doctrine\DBAL\Driver\ PDOException

SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "'[0] and w.swedenborgtype not in ('" LINE 1: ...w.swedenborgtype = wt.name and t.language_id = 205'[0] and w... ^

  1.     public function execute($params null)
  2.     {
  3.         try {
  4.             return parent::execute($params);
  5.         } catch (\PDOException $exception) {
  6.             throw new PDOException($exception);
  7.         }
  8.     }
  9.     /**
  10.      * {@inheritdoc}
PDOStatement->execute(null) in vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php (line 153)
  1.         if ($logger) {
  2.             $logger->startQuery($this->sql$this->params$this->types);
  3.         }
  4.         try {
  5.             $stmt $this->stmt->execute($params);
  6.         } catch (Throwable $ex) {
  7.             if ($logger) {
  8.                 $logger->stopQuery();
  9.             }
  10.             throw DBALException::driverExceptionDuringQuery(
Statement->execute() in src/NCBS/WebsiteBundle/Controller/NCBSWController.php (line 241)
  1.     }
  2.     
  3.     function getNativeQueryResults($sql)
  4.     {
  5.         $query $this->getManager()->getConnection()->prepare($sql);
  6.         $query->execute();
  7.         return $query->fetchAll();
  8.     }
  9.         
  10.     function getExplainedStoryList($locale$nStoryId=null)
  11.     {
NCBSWController->getNativeQueryResults('select * from (SELECT distinct on (w.id) w.id as work_id, t.id as translation_id, t.url as translation_url, t.translatedtitle AS title, t.description, case when t.language_id = 202 then 1 else 2 end as lang_order, case when t.islanguagedefault then 1 else 2 end as default_order, w.swedenborgtype, wt.ordering as type_order FROM expositiontranslation t, expositionworktype wt, expositionwork w WHERE w.swedenborgtype IS NOT NULL and t.work_id=w.id and w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w.swedenborgtype not in (\'scientific\', \'transitional\') and t.type_id = 1 and w.ispublic AND t.ispublic and t.url is not null and t.url <> \'\' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title') in src/NCBS/WebsiteBundle/Controller/NCBSWController.php (line 4946)
  1.        $sSql .= " and w.swedenborgtype not in ('scientific', 'transitional')";        
  2.                 
  3.        $sSql .= " and t.type_id = " $this->TRANSLATION_TYPE_ID_TEXT " and w.ispublic AND t.ispublic and t.url is not null and t.url <> '' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title";
  4.    //  echo $sSql."<br>";    
  5.          $aRet = array();   
  6.         $aTemp $this->getNativeQueryResults($sSql);  
  7.            $nLen count($aTemp);           
  8.            foreach($aTemp as $temp)
  9.            {
  10.                $aRet[$temp['swedenborgtype']][] = $temp;
  11.            }
NCBSWController->getSwedenborgWorks(object(Request), 202, '205\'[0]') in src/NCBS/WebsiteBundle/Controller/ExpositionController.php (line 152)
  1.         $nLocaleLanguageID $this->getLanguageIDByShortCode($locale);
  2.         
  3.         $nSelectedLangID $request->query->get('l');
  4.         
  5.         return $this->renderView('index/swedenborg', array(          
  6.             'works' => $this->getSwedenborgWorks($request$nLocaleLanguageID$nSelectedLangID),
  7.             'works2' => $this->getSwedenborgWorks2($request$nLocaleLanguageID$nSelectedLangID),
  8.             'languages' => $this->getSwedenborgWorkLanguages($request),
  9.             'selected_language_id' => $nSelectedLangID,
  10.             'search_domain' => 'w'
  11.         ));
ExpositionController->swedenborgIndexAction(object(Request)) 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);
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_dev.php (line 41)
  1. $kernel->loadClassCache();
  2. error_log("0.3 ClassCache loaded ");
  3. $request Request::createFromGlobals();
  4. $response $kernel->handle($request);
  5. $response->send();
  6. $kernel->terminate($request$response);

PDOException

SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "'[0] and w.swedenborgtype not in ('" LINE 1: ...w.swedenborgtype = wt.name and t.language_id = 205'[0] and w... ^

  1.      * {@inheritdoc}
  2.      */
  3.     public function execute($params null)
  4.     {
  5.         try {
  6.             return parent::execute($params);
  7.         } catch (\PDOException $exception) {
  8.             throw new PDOException($exception);
  9.         }
  10.     }
PDOStatement->execute(null) in vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php (line 117)
  1.      * {@inheritdoc}
  2.      */
  3.     public function execute($params null)
  4.     {
  5.         try {
  6.             return parent::execute($params);
  7.         } catch (\PDOException $exception) {
  8.             throw new PDOException($exception);
  9.         }
  10.     }
PDOStatement->execute(null) in vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php (line 153)
  1.         if ($logger) {
  2.             $logger->startQuery($this->sql$this->params$this->types);
  3.         }
  4.         try {
  5.             $stmt $this->stmt->execute($params);
  6.         } catch (Throwable $ex) {
  7.             if ($logger) {
  8.                 $logger->stopQuery();
  9.             }
  10.             throw DBALException::driverExceptionDuringQuery(
Statement->execute() in src/NCBS/WebsiteBundle/Controller/NCBSWController.php (line 241)
  1.     }
  2.     
  3.     function getNativeQueryResults($sql)
  4.     {
  5.         $query $this->getManager()->getConnection()->prepare($sql);
  6.         $query->execute();
  7.         return $query->fetchAll();
  8.     }
  9.         
  10.     function getExplainedStoryList($locale$nStoryId=null)
  11.     {
NCBSWController->getNativeQueryResults('select * from (SELECT distinct on (w.id) w.id as work_id, t.id as translation_id, t.url as translation_url, t.translatedtitle AS title, t.description, case when t.language_id = 202 then 1 else 2 end as lang_order, case when t.islanguagedefault then 1 else 2 end as default_order, w.swedenborgtype, wt.ordering as type_order FROM expositiontranslation t, expositionworktype wt, expositionwork w WHERE w.swedenborgtype IS NOT NULL and t.work_id=w.id and w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w.swedenborgtype not in (\'scientific\', \'transitional\') and t.type_id = 1 and w.ispublic AND t.ispublic and t.url is not null and t.url <> \'\' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title') in src/NCBS/WebsiteBundle/Controller/NCBSWController.php (line 4946)
  1.        $sSql .= " and w.swedenborgtype not in ('scientific', 'transitional')";        
  2.                 
  3.        $sSql .= " and t.type_id = " $this->TRANSLATION_TYPE_ID_TEXT " and w.ispublic AND t.ispublic and t.url is not null and t.url <> '' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title";
  4.    //  echo $sSql."<br>";    
  5.          $aRet = array();   
  6.         $aTemp $this->getNativeQueryResults($sSql);  
  7.            $nLen count($aTemp);           
  8.            foreach($aTemp as $temp)
  9.            {
  10.                $aRet[$temp['swedenborgtype']][] = $temp;
  11.            }
NCBSWController->getSwedenborgWorks(object(Request), 202, '205\'[0]') in src/NCBS/WebsiteBundle/Controller/ExpositionController.php (line 152)
  1.         $nLocaleLanguageID $this->getLanguageIDByShortCode($locale);
  2.         
  3.         $nSelectedLangID $request->query->get('l');
  4.         
  5.         return $this->renderView('index/swedenborg', array(          
  6.             'works' => $this->getSwedenborgWorks($request$nLocaleLanguageID$nSelectedLangID),
  7.             'works2' => $this->getSwedenborgWorks2($request$nLocaleLanguageID$nSelectedLangID),
  8.             'languages' => $this->getSwedenborgWorkLanguages($request),
  9.             'selected_language_id' => $nSelectedLangID,
  10.             'search_domain' => 'w'
  11.         ));
ExpositionController->swedenborgIndexAction(object(Request)) 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);
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_dev.php (line 41)
  1. $kernel->loadClassCache();
  2. error_log("0.3 ClassCache loaded ");
  3. $request Request::createFromGlobals();
  4. $response $kernel->handle($request);
  5. $response->send();
  6. $kernel->terminate($request$response);

Stack Traces 3

[3/3] SyntaxErrorException

Doctrine\DBAL\Exception\SyntaxErrorException:
An exception occurred while executing 'select * from (SELECT distinct on (w.id) w.id as work_id, t.id as translation_id, t.url as translation_url, t.translatedtitle AS title, t.description, case when t.language_id = 202 then 1 else 2 end as lang_order, case when t.islanguagedefault then 1 else 2 end as default_order, w.swedenborgtype, wt.ordering as type_order FROM expositiontranslation t, expositionworktype wt, expositionwork w WHERE w.swedenborgtype IS NOT NULL and t.work_id=w.id and w.swedenborgtype = wt.name and t.language_id = 205'[0] and w.swedenborgtype not in ('scientific', 'transitional') and t.type_id = 1 and w.ispublic AND t.ispublic and t.url is not null and t.url <> '' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title':

SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "'[0] and w.swedenborgtype not in ('"
LINE 1: ...w.swedenborgtype = wt.name and t.language_id = 205'[0] and w...
                                                             ^

  at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php:54
  at Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException('An exception occurred while executing \'select * from (SELECT distinct on (w.id) w.id as work_id, t.id as translation_id, t.url as translation_url, t.translatedtitle AS title, t.description, case when t.language_id = 202 then 1 else 2 end as lang_order, case when t.islanguagedefault then 1 else 2 end as default_order, w.swedenborgtype, wt.ordering as type_order FROM expositiontranslation t, expositionworktype wt, expositionwork w WHERE w.swedenborgtype IS NOT NULL and t.work_id=w.id and w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w.swedenborgtype not in (\'scientific\', \'transitional\') and t.type_id = 1 and w.ispublic AND t.ispublic and t.url is not null and t.url &lt;&gt; \'\' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title\':SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near &quot;\'[0] and w.swedenborgtype not in (\'&quot;LINE 1: ...w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w...                                                             ^', object(PDOException))
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:169)
  at Doctrine\DBAL\DBALException::wrapException(object(Driver), object(PDOException), 'An exception occurred while executing \'select * from (SELECT distinct on (w.id) w.id as work_id, t.id as translation_id, t.url as translation_url, t.translatedtitle AS title, t.description, case when t.language_id = 202 then 1 else 2 end as lang_order, case when t.islanguagedefault then 1 else 2 end as default_order, w.swedenborgtype, wt.ordering as type_order FROM expositiontranslation t, expositionworktype wt, expositionwork w WHERE w.swedenborgtype IS NOT NULL and t.work_id=w.id and w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w.swedenborgtype not in (\'scientific\', \'transitional\') and t.type_id = 1 and w.ispublic AND t.ispublic and t.url is not null and t.url &lt;&gt; \'\' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title\':SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near &quot;\'[0] and w.swedenborgtype not in (\'&quot;LINE 1: ...w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w...                                                             ^')
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:145)
  at Doctrine\DBAL\DBALException::driverExceptionDuringQuery(object(Driver), object(PDOException), 'select * from (SELECT distinct on (w.id) w.id as work_id, t.id as translation_id, t.url as translation_url, t.translatedtitle AS title, t.description, case when t.language_id = 202 then 1 else 2 end as lang_order, case when t.islanguagedefault then 1 else 2 end as default_order, w.swedenborgtype, wt.ordering as type_order FROM expositiontranslation t, expositionworktype wt, expositionwork w WHERE w.swedenborgtype IS NOT NULL and t.work_id=w.id and w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w.swedenborgtype not in (\'scientific\', \'transitional\') and t.type_id = 1 and w.ispublic AND t.ispublic and t.url is not null and t.url &lt;&gt; \'\' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title', array())
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php:162)
  at Doctrine\DBAL\Statement->execute()
     (src/NCBS/WebsiteBundle/Controller/NCBSWController.php:241)
  at NCBS\WebsiteBundle\Controller\NCBSWController->getNativeQueryResults('select * from (SELECT distinct on (w.id) w.id as work_id, t.id as translation_id, t.url as translation_url, t.translatedtitle AS title, t.description, case when t.language_id = 202 then 1 else 2 end as lang_order, case when t.islanguagedefault then 1 else 2 end as default_order, w.swedenborgtype, wt.ordering as type_order FROM expositiontranslation t, expositionworktype wt, expositionwork w WHERE w.swedenborgtype IS NOT NULL and t.work_id=w.id and w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w.swedenborgtype not in (\'scientific\', \'transitional\') and t.type_id = 1 and w.ispublic AND t.ispublic and t.url is not null and t.url &lt;&gt; \'\' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title')
     (src/NCBS/WebsiteBundle/Controller/NCBSWController.php:4946)
  at NCBS\WebsiteBundle\Controller\NCBSWController->getSwedenborgWorks(object(Request), 202, '205\'[0]')
     (src/NCBS/WebsiteBundle/Controller/ExpositionController.php:152)
  at NCBS\WebsiteBundle\Controller\ExpositionController->swedenborgIndexAction(object(Request))
     (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_dev.php:41)

                                

[2/3] PDOException

Doctrine\DBAL\Driver\PDOException:
SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "'[0] and w.swedenborgtype not in ('"
LINE 1: ...w.swedenborgtype = wt.name and t.language_id = 205'[0] and w...
                                                             ^

  at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:119
  at Doctrine\DBAL\Driver\PDOStatement->execute(null)
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php:153)
  at Doctrine\DBAL\Statement->execute()
     (src/NCBS/WebsiteBundle/Controller/NCBSWController.php:241)
  at NCBS\WebsiteBundle\Controller\NCBSWController->getNativeQueryResults('select * from (SELECT distinct on (w.id) w.id as work_id, t.id as translation_id, t.url as translation_url, t.translatedtitle AS title, t.description, case when t.language_id = 202 then 1 else 2 end as lang_order, case when t.islanguagedefault then 1 else 2 end as default_order, w.swedenborgtype, wt.ordering as type_order FROM expositiontranslation t, expositionworktype wt, expositionwork w WHERE w.swedenborgtype IS NOT NULL and t.work_id=w.id and w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w.swedenborgtype not in (\'scientific\', \'transitional\') and t.type_id = 1 and w.ispublic AND t.ispublic and t.url is not null and t.url &lt;&gt; \'\' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title')
     (src/NCBS/WebsiteBundle/Controller/NCBSWController.php:4946)
  at NCBS\WebsiteBundle\Controller\NCBSWController->getSwedenborgWorks(object(Request), 202, '205\'[0]')
     (src/NCBS/WebsiteBundle/Controller/ExpositionController.php:152)
  at NCBS\WebsiteBundle\Controller\ExpositionController->swedenborgIndexAction(object(Request))
     (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_dev.php:41)

                                

[1/3] PDOException

PDOException:
SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "'[0] and w.swedenborgtype not in ('"
LINE 1: ...w.swedenborgtype = wt.name and t.language_id = 205'[0] and w...
                                                             ^

  at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117
  at PDOStatement->execute(null)
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117)
  at Doctrine\DBAL\Driver\PDOStatement->execute(null)
     (vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php:153)
  at Doctrine\DBAL\Statement->execute()
     (src/NCBS/WebsiteBundle/Controller/NCBSWController.php:241)
  at NCBS\WebsiteBundle\Controller\NCBSWController->getNativeQueryResults('select * from (SELECT distinct on (w.id) w.id as work_id, t.id as translation_id, t.url as translation_url, t.translatedtitle AS title, t.description, case when t.language_id = 202 then 1 else 2 end as lang_order, case when t.islanguagedefault then 1 else 2 end as default_order, w.swedenborgtype, wt.ordering as type_order FROM expositiontranslation t, expositionworktype wt, expositionwork w WHERE w.swedenborgtype IS NOT NULL and t.work_id=w.id and w.swedenborgtype = wt.name and t.language_id = 205\'[0] and w.swedenborgtype not in (\'scientific\', \'transitional\') and t.type_id = 1 and w.ispublic AND t.ispublic and t.url is not null and t.url &lt;&gt; \'\' order by w.id, lang_order, default_order) as w2 order by w2.type_order, w2.title')
     (src/NCBS/WebsiteBundle/Controller/NCBSWController.php:4946)
  at NCBS\WebsiteBundle\Controller\NCBSWController->getSwedenborgWorks(object(Request), 202, '205\'[0]')
     (src/NCBS/WebsiteBundle/Controller/ExpositionController.php:152)
  at NCBS\WebsiteBundle\Controller\ExpositionController->swedenborgIndexAction(object(Request))
     (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_dev.php:41)