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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
EDIT: All of these links look like they go to /t/1000, but left click on one and it goes somewhere else. -bz
-
-
See raw, and facepalm...
-
-
-
lol
-
Why?
-
I think the classic response would be "why not?"
Well, also stress testing I guess, but that sounds boring.
-
I like the fact that the link parser thinks they're linking to posts in the likes thread, but clicking them directly takes you to a different thread for each
-
I like the fact that the link parser thinks they're linking to posts in the likes thread, but clicking them directly takes you to a different thread for each
What are you talking about?
edit: oh, I see. I only middle-clicked them at first which actually does what I'd expect it to
-
When you middle-click, it works fine, as the browser handles it.
When you left-click, Discourse thinks the1000
is the slug, and ignores it.
-
Choosing one at random from the body of the post,
https://what.thedailywtf.com/t/1000/536
leads to topic 536
Onebox, the sidebar, the list of links etc. all lead to /t/1000 on the specified post
https://what.thedailywtf.com/t/1000/536And as noted, middle click opens the likes thread too. As does copying and pasting the link and right click -> open in new tab
-
…and meta.d'd:
https://meta.discourse.org/t/link-left-click-and-middle-click-inconsistency/30127?u=raceprouk
-
For some reason, this
links to post #27.
-
also stress testing I guess, but that sounds boring.
And it found an actual bug. It's amazing the things that will find bugs in Discourse. How is it even possible to get that wrong?
-
How is it even possible to get that wrong?
Have routing code in two places, presumably, and don't keep it in sync. Middle clicking, presumably, reaches the server itself, which has routing code in, again presumably, Ruby. Left clicking is intercepted by JavaScript.
It would seem that JavaScript router assumes
/t/slug/topic_id/post_number
, wherepost_number
is optional. So it assumes that/t/1000/27
means "take me to the OP of the topic whose name is1000
and whose ID is27
".
-
I was looking for a less technical answer (not really; it was intended to be a rhetorical question), that is, how can you get your design so complicated that you
@Onyx said:Have routing code in two places
thus allowing for the possibility that you@Onyx said:don't keep it in sync.
-
I was looking for a less technical answer
Screw you, I saw an opportunity to appear smart and I'm taking it!
how can you get your design so complicated
You want to go all fancy so you put a MVVM (EMber) on top of an existing MVC (Rails)...
-
So, is there any particular reason to demonstrate the bug 1938 times instead of just 1?
-
The problem is that they do-whatever-in-javascript with links instead of just having plain
<a>
s that work normally. Because counting up a number next to the link is more important than having the link work.
-
counting up a number next to the link is more important than having the link work
This — except that it doesn't really explain it, since the number counts right-clicks, too (at least they used increment the number; I haven't checked lately, and I'm not sure about middle-clicks), so they are also being intercepted but passed to the server correctly.
-
So, is there any particular reason to demonstrate the bug 1938 times instead of just 1?
Amusement value?
-
Isn't that the good old "/t/[id] explicitly don't work when requested with AJAX, which is how the fucking navigation works?" bug?
-
This — except that it doesn't really explain it, since the number counts right-clicks, too (at least they used increment the number; I haven't checked lately, and I'm not sure about middle-clicks), so they are also being intercepted but passed to the server correctly.
Because they are intercepting clicks, and not using the history API. Which they are completely comfortable using to change the URL as you scroll. Now, why the hell would you bind right click as well I have no idea, but it's all unnecessary work in the end.
-
-
Here's a bug for you - whyTF did I get a notification for this post?
-
because one of the linked posts/topics is yours?
-
Ah. Makes a modicum of sense. Thanks.
-