Problem/Motivation

Fatal error when trying to create a taxonomy term of type section with an already existed name.

Steps to reproduce

Create a new term of type section with the same name twice.

Proposed resolution

Check if there is a subqueue with that name then do nothing.

Remaining tasks

Create a patch to do the proposed solution.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'subqueue_name' for key 'PRIMARY': INSERT INTO {entity_subqueue} (name, revision_id, queue, uuid, langcode) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => subqueue_name [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => promoted_splash_area_sections [:db_insert_placeholder_3] => 6f0234be-5656-43d8-909c-125920861e58 [:db_insert_placeholder_4] => und ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 846 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Omar Alahmed created an issue. See original summary.

Omar Alahmed’s picture

Assigned: Omar Alahmed » Unassigned
Status: Active » Needs review
FileSize
1.5 KB

The following patch should solve the issue.

abu-zakham’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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