If I check three nodes I would like updated and use the "Update URL Alias" feature from the admin/content page, I get a happy green message that says Updated URL aliases for 3 nodes. but often no aliases were updated. There is no indication why.
In fact, there could be several reasons:
- The Update action in pathauto settings could be set to Do nothing. Leave the old alias intact.
- The node could have the Generate automatic URL alias box unchecked
- The node (or entity) type could have no pattern defined.
- The alias was already using the current pattern
The messaging on the bulk update page should tell me how many aliases were *actually* updated. It would be even better if it also told me why the other aliases were not updated.
It will be hard to get a count for #4, since it looks like the update function overwrites what's in the database even if the values are identical, so I'll shoot for the other three.
Comments
Comment #1
jenlamptonComment #2
jenlamptonComment #3
jenlamptonHere's a first attempt at a patch to add some friendly and useful messaging for bulk updates.
Comment #4
jenlamptonWell, that's not right. Trying again.
Comment #6
jenlamptonComment #7
jenlamptonThis time with no debug messages.
Comment #8
jenlamptonAnd one more to catch the last non-update case.
Comment #9
dani3lr0se commentedHi Jen! I realize that this is 3 years old but I happened to be in the pathauto issue queue while I update this module at work. I was having an issue with "Bulk Generate" not working so I was trying "Update URL alias" to see if that worked. I was getting the same thing you were, "Updated x number of nodes" but nothing worked. With this patch, I am able to see that the url aliases updated.
I also tested this with having the "Do nothing..." option checked and it returned "Skipped x number of nodes because "Do nothing." is checked" So it seems like this works well. Would be neat to get this into a release.
Thanks. :)
Comment #10
dani3lr0se commentedI just wanted to reference this issue here as well. #2770217: Bulk generate does no work in Drupal 7.50. Seems like the "Bulk Generate" feature would benefit from some more descriptive text in it's returned message as well. Just a thought.
Comment #11
darrenwh commentedI think the message text needs to wrapped in t()
Comment #12
dani3lr0se commentedI'll update the patch later tonight, if that's cool? Looks like a nice learning opportunity.
Comment #13
dani3lr0se commentedAdded the t() around the drupal_set_message message text. This works, but is this what you meant?
Comment #16
dani3lr0se commentedAdded t() around all of the messages instead of the entire section. Still works this way when testing, but lets see if it fails again on here.
Comment #17
mably commented