Slug is required in topic URL?

(Jacob Hands) #1

I went to link a topic from another topic and noticed that [link](/t/45202) produces the error
Access Denied while trying to load /t/id_for/14

However [link](/t/blah/45202) works fine. I believe this is a bug.

(Tobias Eigen) #2

actually this is intended behavior. you have to have something in the blah spot in the URL. You can put whatever you want in there.

(Jacob Hands) #3

But why don’t you have to put something in blah when linking the full address? Discourse Meta when you link on anything other than discourse. (Put that up in the address field of browser and it will work.)

(Jeff Atwood) #4

I see what you are saying now. It also works if you open in new tab vs click directly.

(Jacob Hands) #5

Yes exactly. It can’t exactly be removed now since it’d break a lot of links to discourse sites. So I think it should be fixed to allow t/1234 within the same Discourse site for consistency.

(John Muhl) #6

Seems similar to:

(Jacob Hands) #7

Yeah that’s the same issue (I couldn’t find that when searching.)
@codinghorror says there that a slug of at least 1 character is required. If that’s the case, how did it end up that slugs aren’t required for fully qualified links?

(Tobias Eigen) #8

that’s a good point and I wasn’t aware of it. I don’t think this used to work and I’m not sure why it does.

nice URL hacking! :wink: