2

I have a site under development, that is a migration from an different cms via the Migrate module. I noticed that the links for a lot of my user profiles are not staff/lastname-firstname as I set in the pathauto settings, but /firstname-lastname.

Looking in the url_alias table I see one alias for staff/lastname-firstname (pid 1644030) and another one (pid 1644031) for firstname-lastname. I point out the pids just because it appears that they are probably being created one after the other. They are both marked as language undefined, most likely due to the neutral path module. I suspect that one of the aliases was originally meant to be for English and the second for Japanese, but there is no setting in pathauto for different language paths for users. I can try disabling the neutral path module and rerunning my migration to confirm that they were each meant for different languages, but how can I fix it? I do not need a /firstname-lastname path in the system. I only want /staff/lastname-firstname to be generated.

  • Back up db first, then delete them all, then use the Bulk Update tab in pathauto to re-create them. – No Sssweat Aug 9 '16 at 0:57
  • I'm rerunning the migration a lot right now, and I believe they are getting recreated every time. I need to figure out how to keep them from being created in the first place. – UltraBob Aug 9 '16 at 1:01
  • true, but could be a migration thing, try this and see if they get re-created. – No Sssweat Aug 9 '16 at 1:03
  • They do get recreated, now I get 2 that both point to the right place, which is less than ideal, but ok. Unfortunately, the next time I run the migration it will be back to how it was. – UltraBob Aug 9 '16 at 1:11
  • I think I found the reason in my migration as you suggested, somehow I missed it on the previous scan. – UltraBob Aug 9 '16 at 1:19
1

Then first go to /admin/config/search/path/delete_bulk and delete the aliases in question.

Disable Pathauto for the migration process.

Once your site has been migrated, then enable pathauto and do a bulk update /admin/config/search/path/update_bulk

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.