Specifically have checker set to not allow duplicates, yet a bunch of duplicate links have been added. Using 2x.dev from Sep 5. Thanks.

CommentFileSizeAuthor
#10 weblinks_575512.patch7.14 KBnancydru

Comments

Starminder’s picture

OK, I see what is going on -

If link a exists: www.example.com and someone comes along and puts

link b as: http://www.example.com/

the checker allows this.

nancydru’s picture

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

Which would be more correct, with or without the trailing slash? It wouldn't be that hard to change it either way.

Starminder’s picture

Beauty is in the eye of the beholder? :) I prefer without the slash, and if that domain is already there without a slash, not to let another one come along and make a duplicate just by adding a slash. or vice-versa. If it is alreeady a link that exists with a slash at the end, don't allow the non-slash site to be added. In any case, to me www.example.com and www.example.com/ are duplicates of each other - so if one exists the other should not be allowed.

nancydru’s picture

I've just had the need to be reading up on Apache and it looks like if the / is not there, it will add one under the covers. On the other hand, the Path module tells you not to use a trailing slash. Hmm, which to do?

Starminder’s picture

Don't allow the site with the trailing slash :) Just my opinion. However, there will be instances where a very specific link is required such as www.example.com/examples/new.html so it's a tough call. If there is something after the slash, would it then be allowable?

I'm running into dupes such as www.example.com exists, and someone else comes along and adds www.example.com/index.html. How annoying.

I am one by one removing all the duplicates my overzealous users added. It is slow and tedious :) I just noticed something else - if I edit a link and remove the trailing slash and the checker then recognizes it as a duplicate, I then hit the delete button, but the entry doesn't really get deleted.

If you need that as a new issue let me know.

Thanks!

nancydru’s picture

Yes, that should be a new issue. Also check if the "delete link" link works, please.

Robert and I discussed this last night. We don't mind so much disallowing trailing slashes, but we don't really want to do an update to check for existing ones (for the very reasons you are finding). And there is a limit, because of performance, to how much "butt-saving" we want to do; for example, checking the "www" on the front (www.example.com vs example.com). As for example.com/index.html, that's a different URL, IMHO.

At any rate, we want to get a new release out momentarily, so we'd like to wait until after that.

Starminder’s picture

The "delete link" link works, but the delete button on the edit page does not (opened a new issue).

Whatever you want to do on this one is fine with me, mainly just wanted to bring up that a function of the checker is to disallow duplicate submissions, but it does allow it if the url is different in any way. So, if there is a way to be more....stringent...with the checker, it would be a good thing.

Since some sites are in subfolders, then www.examplesites.com/site1 and www.examplesites.com/site2 should be considered different. I still also think either www.example.com and www.example.com/ should be allowed, but if one exists the the other should not be allowed to be added. Not sure how hard that is, but I think that would be a method for reducing duplicate entries.

Thanks!!

nancydru’s picture

Status: Postponed (maintainer needs more info) » Active

Well, this was interesting: http://www.alistapart.com/articles/slashforward/

There should be a trailing slash unless the URL ends with a file extension. Sigh, I guess this means a hook_update_N.

nancydru’s picture

Well, this was interesting: http://www.alistapart.com/articles/slashforward/

There should be a trailing slash unless the URL ends with a file extension. Sigh, I guess this means a hook_update_N.

nancydru’s picture

Status: Active » Needs review
StatusFileSize
new7.14 KB

As I said, I'd like to hold off on this until we get the new release out, but here's a patch for you to test.

nancydru’s picture

Assigned: Unassigned » nancydru

BTW, there is still some room for duplicates. http://www.example.com and http://www.example.com:80 will be "different." There is also a hook_update_N that will put the trailing slash into the latest revision, if appropriate. The update itself will not check for duplicates.

nancydru’s picture

Status: Needs review » Fixed

Committed to 6.x-2.x-dev.

nancydru’s picture

Status: Fixed » Closed (fixed)

Included in 6.x-2.3.

drupalusering’s picture

how about the long urls? For some reason the link checker fails to detect a duplicate of an example link like: http://www.lowes.com/lowes/lkn?action=categorySelect&Ne=4294967294&categ... . I can keep posting this link over and over without errors

walker2238’s picture

How is this fixed? I'm using the latest dev and can submit the same link over and over again.

Just as drupalusering stated, I'm experiencing the same issue.

http://sports.yahoo.com/nfl/news?slug=ap-patriots-ochocinco
http://sports.yahoo.com/nfl/news;_ylt=Apkykihi3a2_E9dATAgjPykdsLYF?slug=...

Those are just two of many links that can be duplicated.

nancydru’s picture

Status: Closed (fixed) » Active