I recently updated from 6.x-1.1 to 6.x-1.2 and automated alias settings stopped working. I have the following setting: Create a new alias. Delete the old alias.

However, when I save a node now, the alias is not updated. I logged in with root user account and the Automatic Alias box is not checked when editing a node. I have a bunch of old articles that I recycle and now all of the ones that have been published with new content all have the old aliases, which is not good. Is there some setting that needs to be adjusted with 1.2 that was not available with 1.1?

Comments

Coupon Code Swap’s picture

I have had to revert to 6.x-1.1. 6.x-1.2 and the latest dev are not working. Unfortunately, Google already indexed the old URLs so now there are a lot of 301 redirects to do :(

dave reid’s picture

1. Should've used Path Redirect. :/
2. Did you change the alias setting for the content type since you created a node of that type? Because before, Pathauto would just play dumb and leave the checkbox unchecked if you don't remember. Now, it compares the node's existing alias to what it would be if it was re-created. If those two are not the same it 'unchecks' the auto-alias checkbox. It's smart in it's own way because it's letting you know (Hey! This alias would normally change if you press save! I'm not going to change the alias, so I'l let you decide.)

Coupon Code Swap’s picture

I've located and resaved all of the nodes that have the funky old URLs using 1.1 so that now the URLs are corrected. Just need to drop all of the redirects in .htaccess file.

Did you change the alias setting for the content type since you created a node of that type? Because before, Pathauto would just play dumb and leave the checkbox unchecked if you don't remember. Now, it compares the node's existing alias to what it would be if it was re-created. If those two are not the same it 'unchecks' the auto-alias checkbox. It's smart in it's own way because it's letting you know (Hey! This alias would normally change if you press save! I'm not going to change the alias, so I'l let you decide.)

I didn't change anything after installing 1.2. I have [title-raw] as the default for nodes. I tried explicitly setting the pattern for the content-type to [title-raw] and it still wasn't updating. Anyways, that's not the issue.

I think the problem with this new approach is that I and the other editor accounts that make updates to the site do not have permissions for pathauto in nodes. So, the pathauto settings are invisible. Since the default behaviour has changed there should've been a warning after updating or something.

To me, the new behaviour seems a bit dumb. If I have "Create a new alias. Delete the old alias." set as the update action, it should do just that (especially since the option to check or uncheck the box is hidden for accounts that don't have privileges to administer the settings while editing a node). If I wanted to leave the old alias intact, I would select "Do nothing. Leave the old alias intact."

Perhaps there should be another setting added, "Create a new alias. Delete the old alias. Uncheck box to create new alias just in case you really didn't want to create a new alias." ;)

greggles’s picture

Status: Active » Closed (won't fix)

heh. #180440: If an alias is manually created, don't automatically replace it on edit.

So far you are the only person to complain against this change. Maybe there is some way that we can do both things, but I don't see it.

Coupon Code Swap’s picture

How about an option for whether or not Automatic alias is checked by default in the node? Seems that would solve both issues.

flaviovs’s picture

Status: Closed (won't fix) » Active

I'm too facing the same issue. Use case:

  1. User without "manage url aliases" permission create a node
  2. Node created -- pathauto setting is [termpath]/[title] (or something like that) so the alias set is "wrongterm/teh-node"
  3. Admin notices that the node has wrong term and a typo on title. Admin then ask user to fix it
  4. User edit node and change term do "goodterm", fix the typo, and save the node -- there's no URL alias checkbox on the node edit form
  5. Node are kept with old URL alias, i.e. it does not change to "goodterm/the-node"

Pathauto has "Update action" set to "Create a new alias. Delete the old alias." When admin edits the node to fix the problem, "Automatic Alias" checkbox is unchecked and the "wrongterm/teh-node" alias is still present.

To correct the aliases, admin will have to either:

  1. Find all nodes where the URL alias doesn't match actual node contents
  2. Delete and regenerate all path alias every time content is updated by users

BTW, I'm not complaining about the change in #180440: If an alias is manually created, don't automatically replace it on edit, but I think that we have a bug here since aliases that are not manually generated are not being updated.

felipe’s picture

I was facing the same problem too! I think the latest dev version corrected this issue.

dave reid’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

I tried to duplicate this but could not. Here is what I did:
- Set my story node path to '[termpath-raw]/[title-raw]'.
- Logged in as a normal user with only permissions to create/edit content
- Create a story with term 'Wrong term' and title 'My story'
- Alias created for the story after creation was 'wrong-term/my-story'
- As the same non-admin user, edited the node and changed the term to 'Correct term' and did not change title
- Alias created for the story after editing was 'correct-term/my-story'

philipperen’s picture

Version: 6.x-1.x-dev » 6.x-1.3
philipperen’s picture

Version: 6.x-1.2 » 6.x-1.x-dev

I'm facing the same problem with the dev version downloaded today... My nodes created as user number 1 are set to "automatic alias" when I update them, but the ones created by a noadmin user are unchecked for "automatic alias" ...

greggles’s picture

Version: 6.x-1.3 » 6.x-1.x-dev

@philipperen - please see the comment Dave made in #8. We need you to comment in that manner (include the pattern you use, logging in/out, creating a node, the title and relevant data about that node, etc.) so that someone else can get the same bug to happen. Without that the bug may never be fixed.

dave reid’s picture

Status: Postponed (maintainer needs more info) » Fixed

No response, so I assume this means it has been solved, fixed, or no longer applies. If that is not the case, feel free to change this issues' status back to active.

Status: Fixed » Closed (fixed)

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