Error on running update.php | #8203 Create a Commerce inbox message

Created on 7 March 2024, 9 months ago
Updated 24 May 2024, 6 months ago

There seems to be an error after updating from 2.36 to 2.38. Is there any workaround...?

  • composer require 'drupal/commerce:^2.38'
  • run update.php
  • got the following error (which prevents running update scripts for other modules)

Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'commerce.8203' for key 'PRIMARY': INSERT INTO "commerce_inbox_message" ("id", "subject", "message", "cta_text", "cta_link", "send_date", "state") 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); Array ( [:db_insert_placeholder_0] => commerce.8203 [:db_insert_placeholder_1] => Introducing the Commerce Dashboard [:db_insert_placeholder_2] => Commerce Core 2.37 introduced a new dashboard to Drupal Commerce. Designed with merchants in mind, it includes easy access management links, sales metrics and summary reports, and project updates in the form of a "Commerce inbox." Future releases will build on this work to give you even greater insight into your store's performance. [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => 1709818928 [:db_insert_placeholder_6] => unread ) in Drupal\mysql\Driver\Database\mysql\ExceptionHandler->handleExecutionException() (line 50 of /home/zuginawu/public_html/commerce.mazzedev.ch/web/core/modules/mysql/src/Driver/Database/mysql/ExceptionHandler.php).

💬 Support request
Status

Fixed

Version

2.38

Component

Other

Created by

🇨🇭Switzerland mazze

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

Comments & Activities

  • Issue created by @mazze
  • Status changed to Fixed 7 months ago
  • 🇮🇱Israel jsacksick

    Really not sure what would cause this? Especially since we're making a merge query from InboxMessageStorage::save() which should update the message and not perform an insert.
    Also how is it that you already have a message? I guess what you could do is removing the message from the database? The DB table is "commerce_inbox_message".

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024