Download & Extend

alert user when url is changed due to it not being unique

Project:Pathauto
Version:5.x-2.1
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

How do I fix that? Thanks!

Comments

#1

This 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.

#2

Title:I'm getting trailing "-0" and "-1" after my urls» alert user when url is changed due to it not being unique
Component:Miscellaneous» User interface
Category:support request» feature request

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.

Sound good?

#3

Yeah, 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.

#4

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...).

#5

Cool. Thx for the replies.

#6

Status:active» needs review

And here's a patch. The message shown to users is:

The automatically generated alias content/asdf conflicted with an existing alias. Alias changed to content/asdf-4.

AttachmentSizeStatusTest resultOperations
244757_6_pathauto_alert_user_unique.patch1.41 KBIgnored: Check issue status.NoneNone

#7

Status:needs review» fixed

Committed to 5.x and HEAD.

#8

Cool, thx!

Sorry for my ignorance. Does it mean that I should apply the patch or should I re-install the module?

#9

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).

#10

Status:fixed» closed (fixed)

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

nobody click here