Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.When I migrated a site from one url to another, the old alias wasn't deleted. (hosting/c/
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | hosting-2163525-6-path_delete-D7.patch | 704 bytes | helmo |
| #6 | hosting-2163525-6-path_delete-D6.patch | 546 bytes | helmo |
| #5 | hosting-2163525-5-path_delete.patch | 488 bytes | helmo |











Comments
Comment #1
helmo CreditAttribution: helmo commentedThis could be seen as a positive feature. Even after migrating a site old links remain functional.
The hosting_migrate_post_hosting_migrate_task() function saves a new new context which in turn saves a new url_alias.
We could make it check and clean up the old one.
It becomes a problem ones you want to re-use the old site name.
E.g migrate example.com to old.example.com, then new.example.com to example.com.
The second migrate task gives an error on "WD path: The alias 'hosting/c/example.com' for path 'node/42' (language '') was not created, because the path 'node/24' already has the same alias."
So maybe we should check and overwrite...
Comment #2
helmo CreditAttribution: helmo commentedI guess it would be fixed by this oneliner... completely untested though.
Comment #3
anarcat CreditAttribution: anarcat commentedComment #4
helmo CreditAttribution: helmo commentedI've tested this manually today with a
drush php-eval.Seems to work ok.
Comment #5
helmo CreditAttribution: helmo commentedPatch for 7.x-3.x
Comment #6
helmo CreditAttribution: helmo commentedAnd some cleanup with comments.
New D6 and D7 patch.
Comment #9
helmo CreditAttribution: helmo commentedComment #11
daften CreditAttribution: daften commentedThanks again, sorry for the non-communication, it was buried deep in my inbox and resurfaced now.