On this page
How does Pathauto determine if the 'Automatic URL alias' checkbox should be checked or not?
Pathauto >= 7.x-1.3
Pathauto now stores the state of the 'Automatic URL alias' checkbox in the database, in the pathauto_state table. This functionality was previously offered by Pathauto Persistent State module and has been merged into the Pathauto module with #936222: Merge in pathauto_persist module functionality to prevent losing manual aliases with node_save() calls.
Pathauto <7.x-1.3
Pathauto uses the following logic (listed by priority) to determine if the Pathauto checkbox should be checked when editing a node:
- If the node is a new node, it defaults to having an automatic alias.
- If the node is not a new node:
- If the node does not currently have an alias, it assumes that the node was manually un-aliased, so it will default to not have an automatic alias.
- If the node's current alias matches the alias that Pathauto would generate based on the pattern, then it will default to checked.
- Otherwise, the checkbox will default to be unchecked.
If you are using the Pathauto persistent state module, then once you save a node, the checkbox will remain checked or unchecked regardless of the logic above until you check or uncheck it later.
(Drupal 8) If you have nodes you've created before installing Pathauto and running Bulk Generate does nothing, because the Automatic URL alias checkbox is unchecked for these items:
- go to /admin/content/
- filter by the Content Type you want
- select all (or choose the items you want
- choose "Update URL alias" from the Action dropdown
This will process each item, generating an alias according to your Patterns. It won't change the status of the "Generate automatic URL alias" checkbox, but that will be checked for when adding a new node of that Content Type.
If you are saving changes to nodes automatically using node_save, you need to specify $node->path['pathauto'] = FALSE; in Drupal 7 or $node->pathauto_perform_alias = FALSE; in Drupal 6 (see http://drupal.org/node/1179988) in order to stop pathauto overwriting any custom paths you might already have for the node.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion