Jump to:
| Project: | Pathauto |
| Version: | 6.x-1.2 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
In the path_redirect options there is one which says "Automatically create redirects when URL aliases are changed" which is checked by default.
In the pathauto there is an option under the General Settings | Update action there are 4 options of which the default is "Create a new alias. Delete the old alias."
If that option is set will path_redirect handle the switch automatically?
If the pathauto option is "Create a new alias. Redirect from old alias." will the redirect be handled by path_redirect under its own default options?
In short do the two cooperate or work independently?
When I changed the title of a post , pathauto deleted the original alias under its default setting, and path_redirect did nothing under its defaults. I had to add it manually.
I guess this query belongs in both issue queues?
Comments
#1
In the path_redirect options there is one which says "Automatically create redirects when URL aliases are changed" which is checked by default.
In the pathauto there is an option under the General Settings | Update action there are 4 options of which the default is "Create a new alias. Delete the old alias."
If that option is set will path_redirect handle the switch automatically?
If the pathauto option is "Create a new alias. Redirect from old alias." will the redirect be handled by path_redirect under its own default options?
In short do the two cooperate or work independently?
When I changed the title of a post , pathauto deleted the original alias under its default setting, and path_redirect did nothing under its defaults. I had to add it manually.
My understanding that path_redirect is a way of stopping different links from pointing to identical content
#2
In short: the two work independently.
The option "Automatically create redirect" (on the Path Redirect admin screen) only governs situations where you manually change a path setting. Whether pathauto is or isn't installed, does not change this behavior.
Detail: when saving a node from the edit screen, the Path Redirect code executes before Pathauto does. It has no knowledge of whether Pathauto will or will not change the path alias, later on.
If pathauto runs afterwards and decides that the path needs changing, it will look only at its own "Update action" to determine what to do. If that is "Delete the old alias", it will indeed get deleted, and no redirect will be created (regardless of the "Automatically create redirect" option in the Path Redirect admin screen).