Bug #102397
closedPostgreSQL: Argument of AND must be type boolean, not type integer
0%
Description
When translating a page in TYPO3 v12 using a Postgres Database the following error appears:
An exception occurred while executing a query: SQLSTATE42804: Datatype mismatch: 7 ERROR: argument of AND must be type boolean, not type integer LINE 1: ...RE ("pid" = $1) AND ("sys_language_uid" = 0) AND (1 AND (("...
The full query is this:
SELECT "uid" FROM "pages" WHERE ("pid" = ?) AND ("sys_language_uid" = 0) AND
(1 AND (("pages"."hidden" = 0) AND ("pages"."starttime" <= 1700242560) AND
((("pages"."endtime" = 0) OR ("pages"."endtime" > 1700242560))))) AND ("pag
es"."deleted" = 0) ORDER BY "uid" ASC
This is due to the fact that Postgres can't handle 1 and 0 as boolean and fails.
The translated page record is still created as this query is not responsible for the new record but executed after the record was created.
A similar error was reported here (https://forge.typo3.org/issues/75912) a long time ago but was related to content elements.
Can you please take a look at this?
Thank you!
Files