# Broken links in posts

**URL:** <https://discuss.gradle.org/t/broken-links-in-posts/18691>\
**Category:** Meta\
**Created:** [July 26, 2016, 11:13pm UTC](https://discuss.gradle.org/t/broken-links-in-posts/18691 "2016-07-26T23:13:11Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Dore](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/chris_dore/32/7592_2.png) [@Chris\_Dore](https://discuss.gradle.org/u/Chris_Dore)\
**Post date:** [July 26, 2016, 11:13pm UTC](https://discuss.gradle.org/t/broken-links-in-posts/18691/1 "2016-07-26T23:13:11Z")

</div>

Hi,

Lately I’ve been unable to open links embedded in posts. Curiously, they do work if I open them in a new tab (Chrome, ctrl+click).

For example, in [this post](https://discuss.gradle.org/t/resolving-dependency-conflict-in-gradle-when-artifact-name-is-different/18661/2) I added a link to:

```
https://docs.gradle.org/current/userguide/dependency_management.html#sec:module_substitution

```

Clicking on that link takes me to

```
https://discuss.gradle.org/clicks/track?url=https%3A%2F%2Fdocs.gradle.org%2Fcurrent%2Fuserguide%2Fdependency_management.html%3F%26_ga%3D1.144685877.1298902563.1401131382%23sec%3Amodule_substitution&post_id=56281&topic_id=18661

```

which results in a blank page. However, opening the link in a new tab takes me to

```
https://docs.gradle.org/current/userguide/dependency_management.html?&_ga=1.144685877.1298902563.1401131382#sec:module_substitution

```

which works.

I had some collegues verify that they are seeing similar behaviour.

Chris

---

<div class="post-metadata">

**Author:** ![Rene](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/rene/32/8082_2.png) [@Rene](https://discuss.gradle.org/u/Rene)\
**Post date:** [July 27, 2016, 8:35am UTC](https://discuss.gradle.org/t/broken-links-in-posts/18691/2 "2016-07-27T08:35:29Z")

</div>

Thanks for the report. I can reproduce this issue with chrome. It seems to work well with Safari though. It seems like an issue with discourse, the forum software we use for [discuss.gradle.org](http://discuss.gradle.org). Maybe one of the discuss developers @sam, @eviltrout or @codinghorror have an idea?

cheers,  
René

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/codinghorror/32/29_2.png) [@codinghorror](https://discuss.gradle.org/u/codinghorror)\
**Post date:** [July 27, 2016, 9:16am UTC](https://discuss.gradle.org/t/broken-links-in-posts/18691/3 "2016-07-27T09:16:46Z")

</div>

Hmm, one workaround might be to escape the colon for now:

`https://docs.gradle.org/current/userguide/dependency_management.html#sec%3Amodule_substitution`

[https://docs.gradle.org/current/userguide/dependency\_management.html#sec%3Amodule\_substitution](https://docs.gradle.org/current/userguide/dependency_management.html#sec%3Amodule_substitution)

Nope, it doesn’t like that either. @eviltrout you should have a look.

---

<div class="post-metadata">

**Author:** ![eviltrout1](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/eviltrout1/32/3451_2.png) [@eviltrout1](https://discuss.gradle.org/u/eviltrout1)\
**Post date:** [August 2, 2016, 7:33pm UTC](https://discuss.gradle.org/t/broken-links-in-posts/18691/4 "2016-08-02T19:33:08Z")

</div>

I just tried here in Chrome and it seems to be working?

Is it possible we already fixed this somehow? Or am I reproducing it wrong?

---

<div class="post-metadata">

**Author:** ![Rene](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/rene/32/8082_2.png) [@Rene](https://discuss.gradle.org/u/Rene)\
**Post date:** [August 17, 2016, 6:12pm UTC](https://discuss.gradle.org/t/broken-links-in-posts/18691/5 "2016-08-17T18:12:35Z")

</div>

@eviltrout1 just simple clicking the link in this post: [Resolving dependency conflict in gradle when artifact name is different](https://discuss.gradle.org/t/resolving-dependency-conflict-in-gradle-when-artifact-name-is-different/18661/2) results in a blank page. can you reproduce this? I’m using chrome Version 52.0.2743.116 (64-bit) on osx.

cheers,  
René

---

<div class="post-metadata">

**Author:** ![luke\_daley](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/luke_daley/32/9890_2.png) [@luke\_daley](https://discuss.gradle.org/u/luke_daley)\
**Post date:** [August 17, 2016, 11:13pm UTC](https://discuss.gradle.org/t/broken-links-in-posts/18691/6 "2016-08-17T23:13:35Z")

</div>

It’s broken for me too. This is the link it tries to use: [https://discuss.gradle.org/clicks/track?url=https%3A%2F%2Fdocs.gradle.org%2Fcurrent%2Fuserguide%2Fdependency\_management.html%3F\_ga%3D1.49137830.1064984608.1413368436%23sec%3Amodule\_substitution&post\_id=56281&topic\_id=18661](https://discuss.gradle.org/clicks/track?url=https%3A%2F%2Fdocs.gradle.org%2Fcurrent%2Fuserguide%2Fdependency_management.html%3F_ga%3D1.49137830.1064984608.1413368436%23sec%3Amodule_substitution&post_id=56281&topic_id=18661)

---

<div class="post-metadata">

**Author:** ![Rene](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/rene/32/8082_2.png) [@Rene](https://discuss.gradle.org/u/Rene)\
**Post date:** [August 18, 2016, 6:57pm UTC](https://discuss.gradle.org/t/broken-links-in-posts/18691/7 "2016-08-18T18:57:55Z")

</div>

@eviltrout any update on this? We’re getting more & more compliants from our community about this issue.

---

<div class="post-metadata">

**Author:** ![eviltrout1](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/eviltrout1/32/3451_2.png) [@eviltrout1](https://discuss.gradle.org/u/eviltrout1)\
**Post date:** [August 19, 2016, 4:56pm UTC](https://discuss.gradle.org/t/broken-links-in-posts/18691/8 "2016-08-19T16:56:34Z")

</div>

Hi Rene,

I am on the exact same version of Chrome, and I can’t reproduce it. Here’s what I’m doing:

- Clicking the link in your post
- Clicking the link in the post “See Substituting…”

Is it still happening for you right this second? Or has it resolved itself before I got a chance to look at it?

---

<div class="post-metadata">

**Author:** ![Chris\_Dore](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/chris_dore/32/7592_2.png) [@Chris\_Dore](https://discuss.gradle.org/u/Chris_Dore)\
**Post date:** [August 20, 2016, 4:52am UTC](https://discuss.gradle.org/t/broken-links-in-posts/18691/9 "2016-08-20T04:52:54Z")

</div>

One vote for still happening.

Does work; [https://docs.gradle.org/current/release-notes](https://docs.gradle.org/current/release-notes)  
Does work; [https://docs.gradle.org/current/release-notes#new-and-noteworthy](https://docs.gradle.org/current/release-notes#new-and-noteworthy)  
Does not work; [https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/AbstractCopyTask.html#copy()](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/AbstractCopyTask.html#copy())

Same behaviour regardless of “Open all external links in a new tab” option’s state.

---

<div class="post-metadata">

**Author:** ![eviltrout1](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/eviltrout1/32/3451_2.png) [@eviltrout1](https://discuss.gradle.org/u/eviltrout1)\
**Post date:** [August 22, 2016, 5:14pm UTC](https://discuss.gradle.org/t/broken-links-in-posts/18691/10 "2016-08-22T17:14:42Z")

</div>

I just clicked all three of those links and they are working for me. I swear I’m not trying to be difficult here, I just can’t reproduce it!

Is it still broken when you click the links? Is there some difference between my account and yours perhaps?

---

<div class="post-metadata">

**Author:** ![luke\_daley](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/luke_daley/32/9890_2.png) [@luke\_daley](https://discuss.gradle.org/u/luke_daley)\
**Post date:** [August 23, 2016, 2:09am UTC](https://discuss.gradle.org/t/broken-links-in-posts/18691/11 "2016-08-23T02:09:58Z")

</div>

It’s broken for me even with curl. The third link from @Chris_Dore yields a URL of `https://discuss.gradle.org/clicks/track?url=https%3A%2F%2Fdocs.gradle.org%2Fcurrent%2Fjavadoc%2Forg%2Fgradle%2Fapi%2Ftasks%2FAbstractCopyTask.html%3F_ga%3D1.15536054.1064984608.1413368436%23copy()&post_id=57410&topic_id=18691`

```gradle
$ curl -i 'https://discuss.gradle.org/clicks/track?url=https%3A%2F%2Fdocs.gradle.org%2Fcurrent%2Fjavadoc%2Forg%2Fgradle%2Fapi%2Ftasks%2FAbstractCopyTask.html%3F_ga%3D1.15536054.1064984608.1413368436%23copy()&post_id=57410&topic_id=18691'

HTTP/1.1 200 OK
Server: nginx/1.11.3
Date: Tue, 23 Aug 2016 02:06:19 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Discourse-Route: clicks/track
Set-Cookie: _forum_session=K1R2cmRabGk4cnp4WGU5bmp2dGQxQ0lSOUllYkJaK0FMWTJEWnZPdkx0TjZVQ1JlYVgxb0U0SEdUSTcrekFxcXZ1em1Rd3dGZklPUldxcC9VTmVTWmc9PS0taEQ1VHNWcWFNcmpyNFB1bmdZZkFZZz09--b491872b2aadc5cc5d9d94d9d0c59358451a6802; path=/; HttpOnly; Secure
X-Request-Id: 16f6424f-e33e-4768-beba-dc008e511f99
X-Runtime: 0.052966
X-UA-Compatible: IE=edge
Discourse-Proxy-ID: app-router-tiefighter31
Strict-Transport-Security: max-age=31415926

```

If I try the first link in @Chris_Dore’s list above, and track the activity with the web inspector I see that it goes through the following redirect that works `https://discuss.gradle.org/clicks/track?url=https%3A%2F%2Fdocs.gradle.org%2Fcurrent%2Frelease-notes%3F_ga%3D1.14534583.1064984608.1413368436&post_id=57410&topic_id=18691`

```gradle
$ curl -i 'https://discuss.gradle.org/clicks/track?url=https%3A%2F%2Fdocs.gradle.org%2Fcurrent%2Frelease-notes%3F_ga%3D1.14534583.1064984608.1413368436&post_id=57410&topic_id=18691'

HTTP/1.1 302 Found
Server: nginx/1.11.3
Date: Tue, 23 Aug 2016 02:08:13 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Discourse-Route: clicks/track
Location: https://docs.gradle.org/current/release-notes?_ga=1.14534583.1064984608.1413368436
Set-Cookie: _forum_session=dXk2WUZXM1BCZXNNNTJhN1MyOHR5b25ZRllmWFpRc0lMTmF4bEhkSmdJbFovV2dldm02TU5ZNWVGYkFZTWdsd0c3WVB3RjRleEVJQW1hd2JrQVo1UGc9PS0tWFdLUjlKR3NCajNvOUlLVEVjZlVnQT09--dce8f3b67f1af2a3535991f0be20fb98f940212a; path=/; HttpOnly; Secure
X-Request-Id: c7f17b34-2ec2-4c89-9d9c-63afd392ee09
X-Runtime: 0.004042
X-UA-Compatible: IE=edge
Discourse-Proxy-ID: app-router-tiefighter31
Strict-Transport-Security: max-age=31415926

<html><body>You are being <a href="https://docs.gradle.org/current/release-notes?_ga=1.14534583.1064984608.1413368436">redirected</a>.</body></html>

```

---

<div class="post-metadata">

**Author:** ![eviltrout1](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/eviltrout1/32/3451_2.png) [@eviltrout1](https://discuss.gradle.org/u/eviltrout1)\
**Post date:** [August 23, 2016, 3:03pm UTC](https://discuss.gradle.org/t/broken-links-in-posts/18691/12 "2016-08-23T15:03:12Z")

</div>

Aha the curl was a good clue - I can reproduce it via private browsing mode now.

Now to figure out what’s up and fix it!

---

<div class="post-metadata">

**Author:** ![eviltrout](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/eviltrout/32/40_2.png) [@eviltrout](https://discuss.gradle.org/u/eviltrout)\
**Post date:** [August 23, 2016, 4:14pm UTC](https://discuss.gradle.org/t/broken-links-in-posts/18691/13 "2016-08-23T16:14:43Z")

</div>

It seems google analytics here has cross domain tracking turned on, which was adding query parameters to URLs for tracking. This was causing our redirect code to fail as the URL was changing from what we were allowing.

Here’s a fix for the issue:

> <https://github.com/discourse/discourse/commit/1468616465b720269225d3be590b6944c78aa70d>

Next time we deploy the site it should fix the issue.

---

<div class="post-metadata">

**Author:** ![Chris\_Dore](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/chris_dore/32/7592_2.png) [@Chris\_Dore](https://discuss.gradle.org/u/Chris_Dore)\
**Post date:** [August 26, 2016, 7:12pm UTC](https://discuss.gradle.org/t/broken-links-in-posts/18691/14 "2016-08-26T19:12:45Z")

</div>

Great work guys! Thank you for getting this resolved.
