Mislink fix January 21, 2008 3:48 PM   Subscribe

Two posts today accidentally link to Metafilter instead of their intended targets. On the main page, they link to metafilter.com, but within their individual threads, they link to their own individual threads. How is this done? Also, this seems like a pretty common mistake; I've seen it happen a few times before. To prevent the admins from having to go in and fix things, maybe the New Post code should check to see if any links point to the the main site (and if so, ask the user whether this was intended).
posted by painquale to Bugs at 3:48 PM (32 comments total)

It an empty link:

<a href=""></a>

probably due to a mispaste/misclick on the part of the poster. An empty link is interpreted by a browser as a link back to the current document, hence the behavior you're seeing.

As far as fixin' them, we do it when we see 'em and can figure out (or someone mentions, or we ask the poster) what the link was supposed to be. My impression is that it doesn't happen a whole heck of a lot, really. Maybe once or twice a day?

A check might be an interesting way to deal with it, though.
posted by cortex (staff) at 3:53 PM on January 21, 2008 [1 favorite]


It's done when someone does an empty reference like this link

<a href=""></a>

It's pretty much from people setting up 4 or 5 links in their post, but then forgetting to paste in all the URLs. It's pretty rare and two in one day is really really really rare, so I don't know if we need a huge apparatus to combat it. They still got a preview screen to check the links on and it is stressed on that page that they should check their links before hitting post.
posted by mathowie (staff) at 3:54 PM on January 21, 2008


How is this done?

The broken links are empty hrefs. So when you click the "link" you go to the page you're already on. That's why it appears to be different links in different places.

We could find a way to strip out empty links automatically, but if they're flagged enough times with "HTML/Display Error" this is an easy fix by hand.
posted by pb (staff) at 3:54 PM on January 21, 2008


*pages jessamyn*
posted by cortex (staff) at 3:55 PM on January 21, 2008 [2 favorites]


At least I wasn't last.
posted by pb (staff) at 3:55 PM on January 21, 2008


Ahh! An admin onslaught!

Thanks, guys.
posted by painquale at 3:57 PM on January 21, 2008


*pages jessamyn*

Oh Hi! This happens when when someone doesn't add a hyperlink like this link



<a href=""></a><br>
Usually an email to us will fix things.


I don't see this happening too often so I'm not sure if we need some big fix for it.
posted by jessamyn (staff) at 3:57 PM on January 21, 2008 [2 favorites]


damnit!
posted by jessamyn (staff) at 3:59 PM on January 21, 2008 [1 favorite]


Sorry I ruined the admin rush, Jessamyn. I would have been totally overwhelmed otherwise.
posted by painquale at 4:01 PM on January 21, 2008


It wouldn't be that hard to check for an empty link, though, would it? Certainly no harder than checking for double posts.
posted by empath at 4:06 PM on January 21, 2008


while you're at it, you could check for posts with leading slashes, too. That happens every once in a while.
posted by empath at 4:07 PM on January 21, 2008


Problem? Empty link.
Not often seen hereabouts.
Easy fix: email mods.
posted by googly at 4:18 PM on January 21, 2008


Cool. I was always curious what caused that.
posted by Bugbread at 4:30 PM on January 21, 2008


There's more info on the here on the wiki.
posted by eyeballkid at 4:31 PM on January 21, 2008 [2 favorites]


self-pwnage, rofl
posted by cortex (staff) at 4:42 PM on January 21, 2008




It'll also break if you forget to put in the "http://"
posted by Dave Faris at 4:55 PM on January 21, 2008 [1 favorite]




Creepily synchronous admins are creepily synchronized.
posted by CKmtl at 5:11 PM on January 21, 2008


We could find a way to strip out empty links automatically, but if they're flagged enough times with "HTML/Display Error" this is an easy fix by hand.

If you strip them out, no one will notice, and they won't get flagged. So the broken current setup is better. Fun!
posted by smackfu at 5:18 PM on January 21, 2008


Now that's service!
posted by Neiltupper at 5:19 PM on January 21, 2008


Does that mean Jessamyn or Cortex or pb will buy me the beer that Matt owes me?
posted by Astro Zombie at 7:33 PM on January 21, 2008


damnit!

Ok, c'mon, you're joking. You saw Matt and Cortex say the same thing.
posted by dgaicun at 8:11 PM on January 21, 2008


Maybe it's not the case any more, but it used to be that if you left out the http:// part of the href= the result wouldn't link properly (maybe appending your href= text to the end of the current page's address?).

A test:

google, without http://
google, with http://

I never thought to bring it up (and made the mistake myself a few times), but is there any reason not to recode this to work as one would expect in both instances?
posted by nobody at 11:38 PM on January 21, 2008 [1 favorite]


(On post-view, I'd be surprised if this isn't a more common mistake than leaving the link out completely).
posted by nobody at 11:40 PM on January 21, 2008


(On post-post-view, and after viewing source, I see it's a browser thing. The href value in the source is still ="www.google.com" but without the http:// firefox interprets it as extra text following the current page's address, so the solution would be to automatically add "http://" to the beginning of any href= value when missing). Three comments in a row is excessive.)
posted by nobody at 11:46 PM on January 21, 2008


It wouldn't be that hard to check for an empty link, though, would it? Certainly no harder than checking for double posts.

Yeah, I think stripping out would be problematic, but just giving the user a warning along the lines of "one of your links appears to point to Metafilter" would be worth doing and would really just be another test and error condition in a routine that's there already.
posted by teleskiving at 2:23 AM on January 22, 2008


> ...so the solution would be to automatically add "http://" to the beginning of any href= value when missing

You want a value parser that guesses the intentions of the poster.

Without the leading http://, it's assumed you mean to link to a local file called www.google.com -- there's nothing to prevent you from doing that*. And while it's trivial and mostly-safe to assume that the user means the website Google rather than a file called "Google", the problem magnifies once you try to encompass the entirety of the Internet namespace.
posted by ardgedee at 5:38 AM on January 22, 2008


* (missing footnote: It's fairly hard to do in a default configuration of Windows, where .com is a meaningful extension. Most other operating systems are less interested in what you name your files.)
posted by ardgedee at 5:43 AM on January 22, 2008


Astro Zombie: Does that mean Jessamyn or Cortex or pb will buy me the beer that Matt owes me?

It means, if you play your cards right, you could get them all to buy you a beer within the same few minutes.
posted by koeselitz at 7:28 AM on January 22, 2008 [1 favorite]


I get what you're saying, ardgedee, but can you come up with an example of when someone entering a link through the comment field here would be linking to a local file? (Do some people enter the comment # for on-page links manually instead of right-clicking the timestamp?) In any case, just giving a warning, like teleskiving suggests, should be fine for these instances as well.
posted by nobody at 7:32 AM on January 22, 2008


MetaFilter: Oh Hi! This happens when when someone doesn't add a hyperlink like this link.
posted by Mister_A at 12:53 PM on January 22, 2008


« Older You gotta pregame that sugar, son.   |   Any Centrally Illini Interested In A Meetup? Newer »

You are not logged in, either login or create an account to post comments