The payment process works but there is no transition from cart to order.

Created on 13 June 2024, 5 months ago
Updated 14 June 2024, 5 months ago

Problem/Motivation

Hello,

I install a new site with Drupal 10.2.7 and Commerce Iyzipay Payment Gateway 2.0.7 php 8.1 payment process works and approve the payment over my bank app but I take this error.

The website encountered an unexpected error. Try again later.
Drupal\Core\Entity\Query\QueryException: Entity queries must explicitly set whether the query should be access checked or not. See Drupal\Core\Entity\Query\QueryInterface::accessCheck(). in Drupal\Core\Entity\Query\Sql\Query->prepare() (line 141 of /home/admin/web/a-rosejewelry.com/public_html/core/lib/Drupal/Core/Entity/Query/Sql/Query.php).

Some search on google and I found this patch

diff --git a/core/lib/Drupal/Core/Entity/Query/Sql/Query.php b/core/lib/Drupal/Core/Entity/Query/Sql/Query.php
index 61cdd988..ad974352 100644
--- a/core/lib/Drupal/Core/Entity/Query/Sql/Query.php
+++ b/core/lib/Drupal/Core/Entity/Query/Sql/Query.php
@@ -138,7 +138,7 @@ protected function prepare() {
}

if (is_null($this->accessCheck)) {
- throw new QueryException('Entity queries must explicitly set whether the query should be access checked or not. See Drupal\Core\Entity\Query\QueryInterface::accessCheck().');
+ $this->accessCheck = FALSE;

after apply the patch payment return to site but on Iyzipay payment didn t complate and I cant see the order, looks still on the cart.

Thank you

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇹🇷Turkey cumhur

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

Comments & Activities

  • Issue created by @cumhur
  • 🇹🇷Turkey Kartagis Istanbul

    Can you reverse the patch you applied because it's wrong, empty your basket, apply the attached patch and try again? Let me know how it goes.

  • 🇹🇷Turkey cumhur

    Thank you I will try

  • 🇹🇷Turkey cumhur

    As you said, I removed the previous patch and added the one you sent, I give 3D approval, it returns to the site but the order does not process. appears in the cart

  • 🇹🇷Turkey cumhur

    When I looked at the log messages I saw the following error

    Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '221abf3f-07eb-42dc-91c6-876672a6d381' for key 'profile_field__uuid__value': INSERT INTO "profile" ("revision_id", "type", "uuid", "status", "uid", "is_default", "data", "created", "changed") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => customer [:db_insert_placeholder_2] => 221abf3f-07eb-42dc-91c6-876672a6d381 [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => a:0:{} [:db_insert_placeholder_7] => 1718294098 [:db_insert_placeholder_8] => 1718294098 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() .....public_html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php

  • 🇹🇷Turkey Kartagis Istanbul

    Did you empty the basket?

  • 🇹🇷Turkey cumhur

    Yes I did

  • 🇹🇷Turkey Kartagis Istanbul

    Clear the cache.

  • 🇹🇷Turkey Kartagis Istanbul

    Try drush sqlq "DELETE FROM profile_field__uuid__value WHERE uuid = '221abf3f-07eb-42dc-91c6-876672a6d381'"

Production build 0.71.5 2024