First of all, pathauto is really great module. I'm glad it's available. Thanks.

I think the update action should always happen when the "automatic alias" checkbox is ticked. In order to make this happen, the "Do nothing--leave old alias intact" action should be removed, OR the "automatic alias" checkbox should be removed from 'edit' pages (not 'add' pages) when "do nothing" option is specified.

My reasoning is this:

Let's say the admin chose the "do nothing--leave old alias intact" option because they didn't want manually generated links breaking when content was edited. (as far as i can figure, the "automatic alias" checkbox is ALWAYS checked by default, which is really the cause of this whole mess.... ). The admin didn't want NON-auto aliases (ie, special manual aliases) blown away when the content is edited and the user forgets to uncheck the 'auto alias' box. So for now, the only recourse is to set update action to "do nothing--leave old alias intact" in order to keep special manual aliases around.

So now, when a user comes to EDIT content, and sees the "automatic alias" checkbox checked (because as i understand it, it is always checked by default), the user will believe it will update the alias automatically, when in fact it wont do any such thing. This is a problem.

Here is the proposed solution:

Remove the "do nothing on update" option... because it leads to users thinking the alias will be updated when in fact it wont be.
Alternatively (preferable to the above change), remove the 'automatic alias' checkbox from content edit page (but not from content add page), when the "do nothing on update" option is selected.

But the ultimate solution to really address the problem would be to ALSO make this change, in addition to the above change:

Add a new, separate radio options group in the pathauto settings allowing three (or at least the first two) of the following options (these would be radio buttons):
-"Automatic Alias" box is always checked by default
-"Automatic Alias" box is always UNchecked by default
-"Automatic Alias" box is checked by default if the current alias was automatically generated, and unchecked by default otherwise. ---- this would be IDEAL!

I realize there may be permissions issues with my proposed solution. Sorry, I did not take the time to think through the implications these changes might have on permissions.

Comments

bigsend’s picture

Version: 7.x-1.x-dev » 5.x-2.3

If I understand right, you mean that when you edit a node that has a manual path setting, that pathauto should NOT change that path unless you specifically tell it to.

Yes that is a bug. Someone please fix it :(

eddified’s picture

Version: 5.x-2.3 » 7.x-1.x-dev

What I mean is that when the admin setting is set to "do nothing", then there is no way to auto-generate the alias when editing. If the admin setting is set to "do nothing" then the checkbox on the edit page does nothing. When editing a node, the alias stays the same whether the box is checked or unchecked. (unless the user also edits the alias text, of course).

The problem I have specifically is this: my site has "do nothing" checked in the admin because we don't want aliases to always be changing when someone edits a node. However, we DO want to be able to force it to auto-update the alias in some circumstances without having to manually change the alias. Most of the time, we want the alias to stay the same when editing a node. Hence the "do nothing" setting in admin. However we want to be able to occasionally force pathauto to re-autogen the alias. This is something we can't do right now.

jumpfightgo@groups.drupal.org’s picture

I agree, this is a serious design flaw. It's not exactly a bug, just not as good design as it could be, and very frustrating for users when the checkbox says it will generate an alias but it doesn't.

The problem appears to be with the function pathauto_create_alias, in pathauto.inc

Instead of checking if an alias actually exists in the table, it just checks if the node is being submitted as an update vs. insert.

I don't feel confident rolling a patch on this one, but I hope that points someone in the right direction.

onejam’s picture

I agree, this isn't a bug but it's something worth considering.

I would prefer that if user unchecked the automatic aliases on Add/Edit content form it should stay unchecked and vice versa.

dave reid’s picture

This should will be fixed with #369840: If a user changes the automatic path, try to remember that in the future. Please review that patch and report back there. If so, please mark this as a duplicate issue.

dave reid’s picture

Status: Active » Closed (duplicate)