I created a bunch of nodes using node_save(). Unfortunately, I forgot to turn on the Automatic alias setting on them. (Actually, I assumed it would be on by default.) Anyone know how I can do that now (in a bulk way)? I can't figure out where in the db that setting is stored. (Other non-db approaches are fine, too.)

Comments

dave reid’s picture

Status: Active » Fixed

It isn't stored in the database. It compares the current alias to what *would* be the alias when the node form is loaded. If those are equal it turns on the autoalias functions.

If you created them pragmatically, it should have created aliases for them. :/

You can go to the admin/build/path/pathauto and use the 'Bulk update' checkboxes in the node settings to bulk update the aliases for your nodes.

sprugman’s picture

You can go to the admin/build/path/pathauto and use the 'Bulk update' checkboxes in the node settings to bulk update the aliases for your nodes.

I did that, but some of them didn't get created. Trying a second time....

[two min]

ok, that's weird. Now, on the second pass, it created the other ones. Is there a limit on the number that can be created at a time?

dave reid’s picture

Yes it's not very intuitive right now. There's a limit set to default 50. It's the 'Maximum number of objects to alias in a bulk update:' option.

sprugman’s picture

Ah-hah! Thanks. Why so low?

dave reid’s picture

Right now it's done all 50 in a row instead of using the Drupal batch API. So it's expensive memory and execution time-wise. We're hopefully going to be using the batch API proper soon, so *all* nodes can be done at once.

greggles’s picture

@sprugman - You can increase the limit to 100 or 200 or whatever feels good to you. It's under general settings.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

feelcreative’s picture

Issue summary: View changes

Just in case anyone necroviews this post - the answer is no longer true in v1.3+ new answer here: https://www.drupal.org/node/1167612