# Link behavior inconsistent

**URL:** https://meta.discourse.org/t/link-behavior-inconsistent/112713
**Category:** Bug
**Created:** [March 27, 2019, 2:53pm UTC](https://meta.discourse.org/t/link-behavior-inconsistent/112713 "2019-03-27T14:53:05Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [March 27, 2019, 2:53pm UTC](https://meta.discourse.org/t/link-behavior-inconsistent/112713/1 "2019-03-27T14:53:05Z")

</div>

Haven’t been able to pin down whether this is due to a plugin ([Assign](https://meta.discourse.org/t/discourse-assign/58044)) or theme component ([Custom Header Links](https://meta.discourse.org/t/custom-header-links/90588)) but as they’re both official I decided to split it down the middle and just file this is a #Contribute > Bug

New instance, only has those components installed. Header Links is necessary because Assign doesn’t appear to add Top Menu options for ‘Assigned to me’ ‘Assigned to All’, that kind of thing.

The first time either of those links are clicked, they show the correct assigned posts. If one is clicked after the other, or the same link gets clicked twice, then it flips from `/latest?assigned=me` or `/latest?assigned=*` to `/latest` which means the wrong posts are returned.

So, from `/` I click “My Tasks” and get `/latest?assigned=me` and then I click “All Tasks” and instead of being directed to `/latest?assigned=*` I’m directed to `/latest`. Also, if I’m already on either page and click the link again I’m directed to `/latest`.

### [v2.3.0.beta5 +200](https://github.com/discourse/discourse/compare/51a6acb2af810b3ee29d8a38a88892d008c5ae2f...tests-passed)

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [March 27, 2019, 4:49pm UTC](https://meta.discourse.org/t/link-behavior-inconsistent/112713/2 "2019-03-27T16:49:11Z")

</div>

Can you give your custom header links settings please ?

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [March 27, 2019, 6:18pm UTC](https://meta.discourse.org/t/link-behavior-inconsistent/112713/3 "2019-03-27T18:18:03Z")

</div>

Sure, they’re:

```
My Tasks,My Tasks,/latest?assigned=me,vdm,self

```

and

```
All Tasks,All Tasks,/latest?assigned=*,vdm,self

```

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [March 28, 2019, 10:00am UTC](https://meta.discourse.org/t/link-behavior-inconsistent/112713/4 "2019-03-28T10:00:38Z")

</div>

Ok looked at it a little bit, I can say for sure it’s not related “Custom Header links” theme component.

You could for example reproduce multiple times when clicking on the assigned tag under a topic:

 ![36](https://global.discourse-cdn.com/meta/original/3X/5/a/5a2e434cdba85073f9c923fb31f4d6d652712832.png)

The issue is probably in Discourse itself, I feel like discourse-assign is generating the correct URL, will dig more later.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [March 28, 2019, 10:36am UTC](https://meta.discourse.org/t/link-behavior-inconsistent/112713/5 "2019-03-28T10:36:34Z")

</div>

I ended up doing two commits:

[https://github.com/discourse/discourse-custom-header-links/commit/bfda9d3b50bd8e027024b62aa0b7e68611248073](https://github.com/discourse/discourse-custom-header-links/commit/bfda9d3b50bd8e027024b62aa0b7e68611248073)

[https://github.com/discourse/discourse-assign/commit/046f1db466d3f6e01a41217c8593001dc66b21ce](https://github.com/discourse/discourse-assign/commit/046f1db466d3f6e01a41217c8593001dc66b21ce)

This will now make a full reload but will avoid losing query params

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [May 4, 2019, 3:50pm UTC](https://meta.discourse.org/t/link-behavior-inconsistent/112713/8 "2019-05-04T15:50:44Z")

</div>

This commit:

[https://github.com/discourse/discourse-custom-header-links/commit/175a027582eac0b95803b3675ea37faf527ae68c](https://github.com/discourse/discourse-custom-header-links/commit/175a027582eac0b95803b3675ea37faf527ae68c)

Reintroduces this bug:

> [@Link behavior inconsistent](https://meta.discourse.org/t/link-behavior-inconsistent/112713/):
>
> Haven’t been able to pin down whether this is due to a plugin ([Assign](https://meta.discourse.org/t/discourse-assign/58044)) or theme component ([Custom Header Links](https://meta.discourse.org/t/custom-header-links/90588)) but as they’re both official I decided to split it down the middle and just file this is a #Bug New instance, only has those components installed. Header Links is necessary because Assign doesn’t appear to add Top Menu options for ‘Assigned to me’ ‘Assigned to All’, that kind of thing. The first time either of those links are clicked, they show the correct assigned posts. If one is cl…

It’s not just clicking the same link where the issue presents. Clicking **between** links with querystrings is fundamentally broken by this change too.

If I click the link for ‘Assigned to Me’ `latest?assigned=me` and follow it with a click to ‘All Tasks’ `latest?assigned=*` it instead takes me to `/latest`.

The alternative, reloading the page, seems like a small inconvenience in comparison.
