I have the "Automatically create redirects when URL aliases are changed." option turned on but it is not creating redirects when a path alias is changed.

Comments

hass’s picture

Priority: Normal » Major

Confirmed to be broken here, too

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

There are multiple ways to change URL aliases. Could either you please describe the process that is failing for you - editing a node? editing an URL alias in Admin > Config > Search > URL aliases?

hass’s picture

Status: Postponed (maintainer needs more info) » Active

Editing a node is broken for sure. Cannot say about the other.

dave reid’s picture

Version: 7.x-1.0-beta3 » 7.x-1.x-dev
Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

I still cannot confirm this. Changing a node's alias manually several different times always adds a redirect from the old path. I need more detailed instructions on how to reproduce this aside from it's broken or it doesn't work.

hass’s picture

Status: Postponed (maintainer needs more info) » Active

I'm using pathauto urls only.

onaz’s picture

Hi guys,

I've had this same issue on my site for months and have subscribed to this issue. When Dave claimed that he can't reproduce, I started testing around.

Findings:

  • Confirmed that the issue concerns redirecting from old pathauto aliases
  • Pathauto and Redirect do not seem to work together the way I want. When pathauto updates the alias for a node (when for example the title changes), the old address gets obsolete and updated to the new one. So if pathauto updates the alias, no redirect is made, whatever the settings of these 2 modules are (and I tested them all).

I decided to revert back to never changing aliases with pathauto until the fix is possibly available someday.

SilviuChingaru’s picture

I can confirm that with pathauto BULK OPERATION NO REDIRECTS are made... Tryed in any configuration of pathauto or redirect settings.
With pathauto normal settings ON NODE EDIT REDIRECT IS WORKING fine. I think the problem is somewere in pathauto batch functions.

SilviuChingaru’s picture

I've tested the second bulet case and the redirect is created. Only when auto paths are generated from bulk operations is not working.

trante’s picture

I also have this problem.

In settings "Automatically create redirects when URL aliases are changed" is checked,
but when i edit a node, alias is changed by pathauto,
But old alias didn't redirects to new one..

If i change alias manually, "Redirect" module creates redirect from old to new one.

Can't it make a rediraction if alias is changed by Pathauto??

Does old versions of "Redirect" does this ?
If so, i can go back to that version.
Thank you

trante’s picture

I tried also tried "redirect 7.x-1.0-beta4"
But it still doesn't create a 301 if alias is changed by pathauto.

dave reid’s picture

What is your Update action setting set to on admin/config/search/path/settings? Is it set to Create a new alias. Delete the old alias.?

trante’s picture

That setting is set to "Create a new alias. Leave the existing alias functioning."

dave reid’s picture

That setting is incompatible with Redirect module as it doesn't remove the old path alias. You'll need to use the Create a new alias. Delete the old alias. setting.

trante’s picture

Thank you. I changed setting to delete old alias.
Now "Redirect" creates an 301 from old alias to new alias,
Also the entry from "/admin/config/search/path/list" is deleted for old alias.

But when i go to old alias from my web browser or check the http headers i saw that old alias gives a 200.

I cleared caches and run a successful cron. But still old alias is opened without rediracton.
I suppose i'm missing something..

dave reid’s picture

Are you seeing the headers for the redirect or the headers for after the redirect has already worked (which would return a 200)?

trante’s picture

I wrote "http://www.example.com/old-alias" to browser and my node is opened,
but the address bar remained same.

Then i used an external site:
http://www.seoconsultants.com/tools/check-server-headers-tool/
I wrote "http://www.example.com/old-alias" to textbox and get this:

SERVER RESPONSE:
HTTP/1.1 200 OK Date: Sun, 19 Feb 2012 22:15:03 GMT Server: Apache X-Powered-By: PHP/5.2.17 X-Drupal-Cache: MISS Expires: Sun, 19 Nov 1978 05:00:00 GMT Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0 ETag: "1329689703" Content-Language: tr X-Generator: Drupal 7 (http://drupal.org) Link: ; rel="shortlink",; rel="canonical" Last-Modified: Sun, 19 Feb 2012 22:15:03 GMT Content-Type: text/html; charset=utf-8

I wrote "http://example.com/" to this site. And a 301 code is written.
Because i redirected to www version by htaccess file last month.

hass’s picture

Why is "Create a new alias. Leave the existing alias functioning." incompatible??? I'm also using redirect module and this setting and it's broken. If this is the reason for this bug, than we found now what need to be fixed here.

dave reid’s picture

Because then you have two conflicting items? It wouldn't make sense to both have a redirect from an old path and *also* have an URL alias on the old path. Just doesn't make sense why you would want that.

hass’s picture

This configuration makes sense. My node/1 has alias foo/bar1. Tomorrow i change the node and pathauto generates a new alias named foo/bar2. In this case i expect that the previous path foo/bar1 ("keep previous alias") get's redirected with 301 to foo/bar2. This path must be kept as long as nobody accesses foo/bar1 for 16 weeks. Than the alias foo/bar1 can be deleted. This is usability wise all logic.

As i know - "keep alias" does not mean a node has two aliases (not supported in url_alias table as i know), it just means the previous alias must become a redirect, but it must be kept as long it's no longer accessed.

trante’s picture

I really appreciate your efforts for module.

In my last tryouts:

* In Pathauto "Create a new alias. Delete the old alias." is selected.

* Manually changed aliases creates a redirect automatically in "/admin/config/search/redirect"
Also old alias entry is automatically deleted from "/admin/config/search/path"
* Automatically (by pathauto) changed aliases creates a redirect automatically in "/admin/config/search/redirect"
Also old alias entry is automatically deleted from "/admin/config/search/path"

* When i try the old aliases both of them gives a 200. They don't gives a 301.
* When i try old aliases, "number of entry" and "last access" don't change in "/admin/config/search/redirect", it remains "zero" and "never" accordingly.

" The access number and last access time date in "Fix 404 pages" part is correct.

trante’s picture

And the worst thing is Google indexes new aliases without redirect. Two different aliases for same node is indexed as clones.
I can see the clones in Google search results.

pancho’s picture

Title: Auto redirect creation not working » Clarify settings to replace old alias by redirect
Category: bug » task

It really seems to work pretty well, just the configuration options are misleading.
Some better wording in the description might clarify things a bit, but in the end, some more integration with the path module's admin pages would be helpful. Why keep things separate that are so tightly integrated?
Also, on node edit, there is no status message, if the old alias has been replaced by a redirect.

dave reid’s picture

Issue summary: View changes

Some concrete suggestions to make for help text would be appreciated since I'm not a good person to try and make those suggestions.

wylbur’s picture

Status: Active » Closed (outdated)

Marking this as outdated for now. If you have suggestions for help text please reopen this ticket.