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).
Comment | File | Size | Author |
---|---|---|---|
#2 | fix-integrity-constraint-violation-duplicate-entry-subqueue-error-3174156-2.patch | 1.5 KB | Omar Alahmed |
Comments
Comment #2
Omar AlahmedThe following patch should solve the issue.
Comment #4
abu-zakham CreditAttribution: abu-zakham at Vardot commented