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

sinmao - April 10, 2008 - 01:38
Project:Pathauto
Version:5.x-2.1
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

How do I fix that? Thanks!

#1

cam8001 - April 13, 2008 - 13:37

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

greggles - April 13, 2008 - 20:54
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

sinmao - April 14, 2008 - 15:09

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

greggles - April 14, 2008 - 20:23

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

sinmao - April 15, 2008 - 03:29

Cool. Thx for the replies.

#6

greggles - May 5, 2008 - 13:52
Status:active» patch (code 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.

AttachmentSize
244757_6_pathauto_alert_user_unique.patch1.41 KB

#7

greggles - May 13, 2008 - 08:53
Status:patch (code needs review)» fixed

Committed to 5.x and HEAD.

#8

sinmao - May 13, 2008 - 14:53

Cool, thx!

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

#9

greggles - May 13, 2008 - 15:43

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

Anonymous (not verified) - May 27, 2008 - 15:52
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.