Bug #75912
closedPostgreSQL: Argument of AND must be type boolean, not type integer
0%
Description
Just ran into this issue with error #1421053336 with current LTS version (7.6.5) and this query:
SELECT "uid" FROM "pages" WHERE "pid" = 7 AND "pages"."deleted" = 0 AND 1
Happened directly after I inserted an record onto my page. Postgres log tells me:
ERROR: argument of AND must be type boolean, not type integer at character 77.
Looks like this is caused by line 1535 in the QueryGenerator:
$res = $databaseConnection->exec_SELECTquery('uid', 'pages', 'pid=' . $id . ' ' . BackendUtility::deleteClause('pages') . ' AND ' . $perms_clause);
Quick and dirty fix: remove the "AND $perms_clause" part. But I believe that the issue lies in the deep as it might cause side effects.
Best regards
Updated by Morton Jonuschat over 8 years ago
- Status changed from New to Accepted
- Assignee set to Morton Jonuschat
- Target version set to Candidate for patchlevel
Probably due to wrong usage of the page permissions methods in the QueryGenerator. Statement is "wrong" on MySQL as well, it just doesn't complain.
Updated by Gerrit Code Review over 8 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48220
Updated by Gerrit Code Review over 8 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48220
Updated by Gerrit Code Review over 8 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48220
Updated by Gerrit Code Review over 8 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48312
Updated by Morton Jonuschat over 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 5b4563b284df88f1eb04aeb54c95cf751bcb3416.
Updated by Bernhard Berger almost 4 years ago
- % Done changed from 100 to 0
- TYPO3 Version changed from 7 to 9
- PHP Version changed from 5.6 to 7.4
- Is Regression changed from No to Yes
I fearr this bug seems to be back.. TYPO3 9.5.24, postgresql..
(1/3) Doctrine\DBAL\Exception\DriverException
An exception occurred while executing 'SELECT "uid" FROM "pages" WHERE ("pid" = ?) AND ("sys_language_uid" = 0) AND (1) AND ("pages"."deleted" = 0) ORDER BY "uid" ASC' with params [21]: 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 ("p... ^
Updated by Christian Kuhn about 2 years ago
Hey.
Could you please raise a fresh issue if this is still an issue and link thin one? New notes on closed issues are likely to be overlooked.
Updated by Christian Kuhn 12 months ago
- Related to Bug #102397: PostgreSQL: Argument of AND must be type boolean, not type integer added