This update from Core 8.8 is failing for me.

8804 - Convert path aliases to entities.

If I run this update with Drupal Console, I'm able to see that this is somehow adding duplicate entries into the path_alias table. I'm not sure why. This is happening for all Group entities.

Executing update function "8804" of module "system"

[ERROR] SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY': INSERT INTO       
{path_alias} (id, revision_id, uuid, path, alias, langcode, status) VALUES (:db_insert_placeholder_0, 
CommentFileSizeAuthor
#2 system_8804_error_drush.txt115.88 KBbrooke_heaton

Comments

brooke_heaton created an issue. See original summary.

brooke_heaton’s picture

Status: Active » Closed (works as designed)
StatusFileSize
new115.88 KB

Closing. This appears related to core and not Group.

RealityBitesYou’s picture

dump the tables:
mysqldump [drupal db name] --tables path_alias path_alias_revision > pathalias.sql
mysql [drupal db name] -e "truncate table path_alias;"
mysql [drupal db name] -e "truncate table path_alias_revision;"

run drush updates:
drush updb
drush cr

load data:
mysql -f [drupal db name] < pathalias.sql

problem solved...

choneyse’s picture

#3 resolved my issue with update perfectly

someshver’s picture

Easy Solution

Step1:-:- Truncate the following tables
path_alias
path_alias_revision
truncate table table_name;
Step2:-:- Run update.php
Step3:-:- After successfull update bulk generate path from
/admin/config/search/path/update_bulk

Thanks

lithiumlab’s picture

#3 is there a way to run this with drush instead of mysql? on a CI environment mysql is not necessarily available in my case.

flyke’s picture

Thanks a lot for #3 works perfect !

gaurav_drupal’s picture

To truncate the tables using drush:

drush sql-query "TRUNCATE TABLE path_alias"
drush sql-query "TRUNCATE TABLE path_alias_revision"