golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.24k stars 17.7k forks source link

x/website: relative links in blog.golang.org posts 404s when followed from the golang.org homepage #36930

Closed s-chand closed 4 years ago

s-chand commented 4 years ago

What version of Go are you using (go version)?

$ go version

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

I visited the Golang.org web page and got a link to an error page which was referenced as though it was available.

I have attached images

What did you expect to see?

The reference to Go 2 Here we come to work or atleast not to display an error

What did you see instead?

I got an lstat error message Screenshot 2020-01-31 at 16 41 36 Screenshot 2020-01-31 at 16 41 51

ALTree commented 4 years ago

Thanks for reporting this.

If you click on that link from the homepage, it goes to golang.org/go2-here-we-come, which 404s, while if you open the blog post (https://blog.golang.org/go1.15-proposals) and then click on the link, it goes to blog.golang.org/go2-here-we-come, which is correct.

cc @toothrot @cagedmantis @dmitshur

dmitshur commented 4 years ago

Thanks for the report. When making a code review suggestion in CL 216199, I didn't take it into account that blog posts are embedded directly on golang.org, and thus cannot use relative relative links to other blog.golang.org pages.

I'll send a fix by rolling back CL 216626 which implemented my faulty suggestion, and file an issue about catching this potential problem via a test. Edit: Filed #36944.

gopherbot commented 4 years ago

Change https://golang.org/cl/217239 mentions this issue: content/go1.15-proposals.article: revert "use relative links for other blog articles"