Project

General

Profile

Actions

Bug #72039

closed

Exception when trying to open a translated page in frontend when using PostgreSQL

Added by Lars Peter Søndergaard almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2015-12-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

This is the following exception I get:

Uncaught TYPO3 Exception
#1310027511: Could not parse where clause (More information)

InvalidArgumentException thrown in file
/var/www/pgsql/typo3_src-build/typo3/sysext/dbal/Classes/Database/DatabaseConnection.php in line 1753.

30 TYPO3\CMS\Dbal\Database\DatabaseConnection::quoteWhereClause("pid = '1' AND colPos = '0' AND tt_content.deleted=…1', CAST("tt_content"."fe_group" AS CHAR)) != 0)))")

/var/www/pgsql/typo3_src-build/typo3/sysext/dbal/Classes/Database/DatabaseConnection.php:
01263:         $select_fields = $this->quoteFieldNames($select_fields);
01264:         $from_table = $this->quoteFromTables($from_table);
01265:         $where_clause = $this->quoteWhereClause($where_clause);
01266:         $groupBy = $this->quoteGroupBy($groupBy);
01267:         $orderBy = $this->quoteOrderBy($orderBy);

29 TYPO3\CMS\Dbal\Database\DatabaseConnection::SELECTquery("*", "tt_content", "pid = '1' AND colPos = '0' AND tt_content.deleted=…1', CAST("tt_content"."fe_group" AS CHAR)) != 0)))", "", "sorting ASC")

/var/www/pgsql/typo3_src-build/typo3/sysext/dbal/Classes/Database/DatabaseConnection.php:
00847:                         $this->lastQuery = $this->SELECTqueryFromArray($remappedParameters);
00848:                     } else {
00849:                         $this->lastQuery = $this->SELECTquery($select_fields, $from_table, $where_clause, $groupBy, $orderBy);
00850:                     }
00851:                     $sqlResult = $this->handlerInstance[$this->lastHandlerKey]->_Execute($this->lastQuery);

28 TYPO3\CMS\Dbal\Database\DatabaseConnection::exec_SELECTquery("*", "tt_content", "pid = '1' AND colPos = '0' AND tt_content.deleted=…1', CAST("tt_content"."fe_group" AS CHAR)) != 0)))", "", "sorting ASC", NULL)

/var/www/pgsql/typo3_src-build/typo3/sysext/core/Classes/Database/DatabaseConnection.php:
00375:     public function exec_SELECTgetRows($select_fields, $from_table, $where_clause, $groupBy = '', $orderBy = '', $limit = '', $uidIndexField = '')
00376:     {
00377:         $res = $this->exec_SELECTquery($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit);
00378:         if ($this->sql_error()) {
00379:             $this->sql_free_result($res);

27 TYPO3\CMS\Core\Database\DatabaseConnection::exec_SELECTgetRows("*", "tt_content", "pid = '1' AND colPos = '0' AND tt_content.deleted=…1', CAST("tt_content"."fe_group" AS CHAR)) != 0)))", "", "sorting ASC", NULL)

[…]

\TYPO3\CMS\Dbal\Database\DatabaseConnection::quoteWhereClause calls \TYPO3\CMS\Dbal\Database\SqlParser::parseWhereClause which returns a string instead of an array: 'No ) parenthesis at end of subquery'.

The where clause that's being parsed is the following, which does not actually seem to have any parenthesis errors:

pid = '1' 
AND colPos = '0' 
AND tt_content.deleted=0 
AND tt_content.t3ver_state<=0 
AND tt_content.pid<>-1 
AND tt_content.hidden=0 
AND tt_content.starttime<=1449133200 
AND (tt_content.endtime=0 OR tt_content.endtime>1449133200) 
AND (tt_content.fe_group='' OR tt_content.fe_group IS NULL OR tt_content.fe_group='0' OR FIND_IN_SET('0',tt_content.fe_group) OR FIND_IN_SET('-1',tt_content.fe_group))
AND (sys_language_uid IN (-1,1) AND uid NOT IN
  (SELECT "l18n_parent" FROM "tt_content" WHERE   
   "sys_language_uid" = 1 
   AND  "tt_content"."deleted" = 0 
   AND  "tt_content"."t3ver_state" <= 0 
   AND  "tt_content"."pid" <> -1 
   AND  "tt_content"."hidden" = 0 
   AND  "tt_content"."starttime" <= 1449133200 
   AND ("tt_content"."endtime" = 0 OR  "tt_content"."endtime" > 1449133200) 
   AND ("tt_content"."fe_group" = '' OR  "tt_content"."fe_group" IS NULL OR  "tt_content"."fe_group" = '0' 
        OR   FIND_IN_SET('0', CAST("tt_content"."fe_group" AS CHAR)) != 0 
        OR   FIND_IN_SET('-1', CAST("tt_content"."fe_group" AS CHAR)) != 0
   )
  )
)

Files

pgsql.localhost - translated page exception.html (31.5 KB) pgsql.localhost - translated page exception.html Full Traceback Lars Peter Søndergaard, 2015-12-04 11:24
Actions

Also available in: Atom PDF