Under settings, have the following option enabled:
- Create a new alias. Delete the old alias.

I had already created URL aliases for Users, changed the pattern, and updated. Nothing. Had to delete the existing User aliases and only then did Bulk Update work.


ptmkenny’s picture

Status: Active » Postponed (maintainer needs more info)

Did you clear your (Drupal) cache first? If so, please try to reproduce this bug from a clean install of Drupal 7.

elephant.jim’s picture

I ran into this same situation. I expected bulk updates of user URL aliases to update all users, but only users who are missing aliases get updated.

The problem is in user_pathauto_bulk_update_batch_process in pathauto.pathauto.inc. The query is restricted to users whose url_alias.source is NULL. You can comment out $query->isNull('ua.source'). Since the url_alias table is only joined for the WHERE, you can also comment out $query->leftJoin('url_alias', 'ua', "CONCAT('user/', u.uid) = ua.source"). (Which also makes things run waaaaaaay faster because that join on integer with a concat string is super slooooooow.)

That leaves the question: why was it this way in the first place? Why did bulk updates only hit users without an alias instead of hitting all users?

elephant.jim’s picture

Status: Postponed (maintainer needs more info) » Active

I s'pose there's a concern that other modules may depend on the join to url_alias (since the query is tagged for alters). You can leave the join for them. It might be wise, though, to apply the patch from here: #1415930: Use cast inside concat for better legacy MySQL performance & pgsql compliance. Change the concat to use a cast on the integer.

All that remains then is to delete line 298.

Dave Reid’s picture

Status: Active » Closed (duplicate)

The 'Bulk update' tab is badly named. It's actually 'Bulk generate' for new items only. You can regenerate Pathauto URL aliases using VBO or the 'Update URL alias' on admin/content or admin/people. See #1003490: Allow users to re-alias entities with the Bulk update page.

elephant.jim’s picture

Okey dokey. Thanks.

But hmmm. I'm still kinda stuck. If I wanna do bulk updates on hundreds or thousands of users at a time, VBO doesn't really cut it. I can only do updates to one page at a time with VBO, and that'd take forever.

Or is there some secret sauce to do all existing users all at once? If not, I'd suggest a patch that does offer a "bulk update" in addition to a "bulk generate".

polskikrol’s picture

@elephant.jim: sounds like a good idea. At a minimum, the tab should be renamed to clarify its function.

fizk’s picture

Just ran into this too. The tip in #4 to use 'Update URL alias' on admin/people did the trick.

@polskikrol The bulk update page says "Select the types of un-aliased paths for which to generate URL aliases", but I didn't read it :)

fizk’s picture

Mo Omar’s picture

I ran into this problem with some content. When I went to the contents, I found the "automatic generate URL" was unchecked. If I ran pathauto bulk updated and delete old aliases, I go back to unclean URLs. In order to fix this, I must go to each node and check "automatic generate URL" and NOT bulk update from pathauto itself.

nofue’s picture

Issue summary: View changes

Ran into the very same issue today -- path auto allows for "deleting all aliases" (thank you, author!) but refuses to "mass create" once all aliases were lost. (Thank you, author!). Well … Despite all the good tips and what not, I went for the "Windows solution" of fixing problems:

  1. Modules::Pathauto::uncheck, then delete module.
  2. Clear Cache
  3. Modules::Pathauto::check again, set rules
  4. Clear Cache
  5. Pathauto::mass create

Voilá. Everything's back to normal. What an ordeal. Sometimes I wonder how stuff like this remains unfixed for (as it seems) more than two years.

Dave Reid’s picture

@nofue: The page at admin/config/search/path/update_bulk is definitely meant to regenerate new aliases for any content that does not have any aliases, which based on your description is what you needed. Did you give that a try at all?

muranod’s picture

@nofue I'm running into the same problem while setting up my Drupal 8 site. Don't remember having this issue in Drupal 7.

UPDATE: Some of the content items had the URL alias defined in the node / edit form. That solved a lot of the problems. Still having a problem getting the date field to show up as I would like (year, month). I think in D7, it relied on the Date module, which I don't have in D8 (as I understand, not all of it is in core). Anyway, it isn't a show stopper.