Created on 2 December 2013, almost 11 years ago
Updated 31 August 2023, about 1 year ago

Hi, I'm running a drupal 7.24 site with drupal commerce installed on Postgres 9.2. I installed payment and payment_commerce and created a simple payment type. When the payment method is selected in checkout and submited I recieve the following Exception.

PDOException: SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block: SELECT 1 AS expression FROM {payment_line_item} payment_line_item WHERE ( (name = :db_condition_placeholder_0) AND (pid = :db_condition_placeholder_1) ) FOR UPDATE; Array ( [:db_condition_placeholder_0] => payment_commerce_47 [:db_condition_placeholder_1] => 1 ) in PaymentEntityController->save() (line 422 of /var/www/drupal-site/sites/all/modules/contrib/payment/payment/payment.classes.inc).

It seems postgres has some issue with the DB merge statement that updates/inserts line items into payment_line_item in the save() method in payment.classes.inc. To work around this I've rolled a patch which checks if the postgres driver is being used, and if so does a seperate update or insert statement. Patch attached, I have tested this and confirmed this works on postgres.

πŸ› Bug report
Status

Closed: duplicate

Version

7.0 ⚰️

Component
PostgreSQL driverΒ  β†’

Last updated 10 days ago

No maintainer
Created by

πŸ‡³πŸ‡ΏNew Zealand sambonner

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024