Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
» alert user when url is changed due to it not being unique
Component:
Miscellaneous
» User interface
Category:
support
» feature
That seems right to me, cam8001. Thanks for your help.
This has come up more than once so I think we should give people a little more feedback about why this happens.
I propose that when a url is found to not be unique the module will check to see if verbose is on and, if so, check to see if the user has the permission to see Pathauto messages. And, of so, displays a message to the user letting them know why the -1 or -2 or whatever was added to their URL.
For me, I have every url end in ".html"; with duplicate url's, they end up looking like this "url.html-1". If I can get them to be "url-1.html", then I would mind it so much. Can I do that with the current release? Thx.
Unfortunately that is not possible now. I can see how it would be nice, though, so I'll think about how it might be possible and hopefully come up with something (or someone else may, of course...).
If you really want to have this feature installed on your site you could just use the 5.x-2.x-dev tarball available from the project homepage. In a few days or so I will create a 5.x-2.3 release of Pathauto which will basically be the same as the current 5.x-2.x-dev file. So, if you use it now you get a preview of the bugfixes and enhancements in that version.
The alternative is to apply the patch file to your current installation (which doesn't always work perfectly since the patch is for the tip of the development branch and may not apply to a previous release).
Comments
Comment #1
cameron tod commentedThis sounds like you have duplicate URLs. Check through your url_alias table to see if you have existing URLs for the ones you are trying to generate.
Comment #2
gregglesThat seems right to me, cam8001. Thanks for your help.
This has come up more than once so I think we should give people a little more feedback about why this happens.
I propose that when a url is found to not be unique the module will check to see if verbose is on and, if so, check to see if the user has the permission to see Pathauto messages. And, of so, displays a message to the user letting them know why the -1 or -2 or whatever was added to their URL.
Sound good?
Comment #3
sinmao commentedYeah, an alert message would be nice.
For me, I have every url end in ".html"; with duplicate url's, they end up looking like this "url.html-1". If I can get them to be "url-1.html", then I would mind it so much. Can I do that with the current release? Thx.
Comment #4
gregglesUnfortunately that is not possible now. I can see how it would be nice, though, so I'll think about how it might be possible and hopefully come up with something (or someone else may, of course...).
Comment #5
sinmao commentedCool. Thx for the replies.
Comment #6
gregglesAnd here's a patch. The message shown to users is:
Comment #7
gregglesCommitted to 5.x and HEAD.
Comment #8
sinmao commentedCool, thx!
Sorry for my ignorance. Does it mean that I should apply the patch or should I re-install the module?
Comment #9
gregglesIf you really want to have this feature installed on your site you could just use the 5.x-2.x-dev tarball available from the project homepage. In a few days or so I will create a 5.x-2.3 release of Pathauto which will basically be the same as the current 5.x-2.x-dev file. So, if you use it now you get a preview of the bugfixes and enhancements in that version.
The alternative is to apply the patch file to your current installation (which doesn't always work perfectly since the patch is for the tip of the development branch and may not apply to a previous release).
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.