- πΊπΈUnited States jrockowitz Brooklyn, NY
Prepending [postgres] to the title to see if someone using postgres can fix it.
Had a different issue, but similar with a Postgres db, while using webform autosave, that was calling into WebformSubmissionLogManager
This change fixed it for me.
Would like to set up automated tests for postgres, but don't know yet how, yet.pgdb_1 | 2023-07-04 18:57:39.489 UTC [38] ERROR: syntax error at or near "." at character 482 pgdb_1 | 2023-07-04 18:57:39.489 UTC [38] STATEMENT: SELECT "log"."lid" AS "lid", "log"."uid" AS "uid", "log"."webform_id" AS "webform_id", "log"."sid" AS "sid", "log"."handler_id" AS "handler_id", "log"."operation" AS "operation", "log"."message" AS "message", "log"."variables" AS "variables", "log"."timestamp" AS "timestamp", "log"."data" AS "data", "submission"."entity_type" AS "entity_type", "submission"."entity_id" AS "entity_id" pgdb_1 | FROM pgdb_1 | "webform_submission_log" "log" pgdb_1 | LEFT OUTER JOIN "users_field_data" "user" ON log.uid = user.uid pgdb_1 | LEFT OUTER JOIN "webform_submission" "submission" ON log.sid = submission.sid pgdb_1 | WHERE ("log"."webform_id" = 'demo_cop') AND ("log"."sid" = '28') pgdb_1 | ORDER BY "timestamp" DESC NULLS LAST pgdb_1 | LIMIT 1 OFFSET 0 web_1 | [Tue Jul 04 18:57:39.497438 2023] [php:notice] [pid 19] [client 172.24.0.1:36616] Uncaught PHP Exception Drupal\\Core\\Database\\DatabaseExceptionWrapper: "SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "."\nLINE 4: ...T OUTER JOIN "users_field_data" "user" ON log.uid = user.uid\n ^: SELECT "log"."lid" AS "lid", "log"."uid" AS "uid", "log"."webform_id" AS "webform_id", "log"."sid" AS "sid", "log"."handler_id" AS "handler_id", "log"."operation" AS "operation", "log"."message" AS "message", "log"."variables" AS "variables", "log"."timestamp" AS "timestamp", "log"."data" AS "data", "submission"."entity_type" AS "entity_type", "submission"."entity_id" AS "entity_id"\nFROM\n"webform_submission_log" "log"\nLEFT OUTER JOIN "users_field_data" "user" ON log.uid = user.uid\nLEFT OUTER JOIN "webform_submission" "submission" ON log.sid = submission.sid\nWHERE ("log"."webform_id" = :db_condition_placeholder_0) AND ("log"."sid" = :db_condition_placeholder_1)\nORDER BY "timestamp" DESC NULLS LAST\nLIMIT 1 OFFSET 0; Array\n(\n [:db_condition_placeholder_0] => demo_cop\n [:db_condition_placeholder_1] => 28\n)\n" at /opt/drupal/web/core/lib/Drupal/Core/Database/ExceptionHandler.php line 66
PS: First time contributor to a drupal project, tried to follow the contribution guide. Let me know if anything needs to change.
- last update
over 1 year ago 537 pass - πΊπΈUnited States jrockowitz Brooklyn, NY
Your patch makes sense because USER is a reserved word in Postgres
https://www.postgresql.org/docs/current/sql-keywords-appendix.htmlIf the test even partially passes for Postgres and MySQL tests are fine, we can probably safely commit the patch.
- Status changed to Needs review
over 1 year ago 10:15am 9 July 2023 - Status changed to RTBC
over 1 year ago 4:40pm 13 September 2023 - π¨π¦Canada joseph.olstad
looks good, should hold up nicely for everyone pgsql/mariadb/mysql/sqlite/mssql/others
-
pirvudoru β
authored 8646caaf on 6.1.x
Issue #3307128 by pirvudoru: [postgres] after purging submissions click...
-
pirvudoru β
authored 8646caaf on 6.1.x
-
pirvudoru β
authored 8646caaf on 6.x
Issue #3307128 by pirvudoru: [postgres] after purging submissions click...
-
pirvudoru β
authored 8646caaf on 6.x
- Status changed to Fixed
over 1 year ago 2:07pm 14 September 2023 -
pirvudoru β
authored 8646caaf on 6.2.x
Issue #3307128 by pirvudoru: [postgres] after purging submissions click...
-
pirvudoru β
authored 8646caaf on 6.2.x
Automatically closed - issue fixed for 2 weeks with no activity.