...and also if you use the '--update' modifier in drush.
I have a very large dataset on my site that I'd rather update than wipe out and reimport every day, and if I run the 'update' rather than clear and reimport, all the nodes that are updated have their path aliases removed.
In addition, if I go to edit the imported node, the 'Automatic alias' checkbox in the "URL path settings" fieldset is unchecked, so if I want to simply run a batch update of path aliases via Pathauto, I still can't update the path aliases to get them back to what they were previously (before migrate --update).
Comments
Comment #1
geerlingguy commentedI fixed the issue on my site by going to pathauto's URL alias settings at admin/build/path/pathauto and setting 'Update action' to "Create a new alias. Redirect from old alias."
However, this is not ideal - if someone didn't want their aliases to change, then the aliases for any migrated nodes would be dumped...
Comment #2
erikwebb commentedUsing Migrate alongside Pathauto seems like a crucial combination. Creating unnecessary aliases just as a workaround is less than ideal, it's quite hacky.
Any other workarounds people have found?
Comment #3
erikwebb commentedI wrote a workaround using hook_migrate_complete_DESTINATION(). It basics removes any aliases created during the import process and manually creates the new link using the proper field.
Here's the ugly workaround I've setup -
Comment #4
geerlingguy commentedYikes - that would need to be done for each content type, I presume...
Comment #5
mikeryanContrib module support goes into the Migrate Extras module. Not sure if this will get looked at closely, V1 is not a priority any more, but any patches will be considered.
Comment #6
mikeryanMigrate and Migrate Extras V1 are no longer supported, and I can't reproduce this situation with V2.