Stephen
(Stephen)
2019 年3 月 27 日 14:53
1
尚无法确定这是由于插件(Assign )还是主题组件(Custom Header Links )引起的,但鉴于两者均为官方出品,我决定各打五十大板,将此问题归类为 #contribute:bug。
新实例仅安装了这两个组件。之所以需要 Custom Header Links,是因为 Assign 似乎没有为「分配给我」、「分配给所有人」等选项添加顶部菜单链接。
首次点击这两个链接中的任何一个时,它们会显示正确的已分配帖子。但如果先点击另一个链接,或者重复点击同一个链接,URL 就会从 /latest?assigned=me 或 /latest?assigned=* 变为 /latest,从而导致返回错误的帖子。
因此,从 / 页面点击「我的任务」后,会跳转到 /latest?assigned=me;接着点击「所有任务」时,本应跳转到 /latest?assigned=*,却跳转到了 /latest。此外,如果我已经处于这两个页面中的任意一个,再次点击相应的链接也会被重定向到 /latest。
j.jaffeux
(Joffrey Jaffeux)
2019 年3 月 27 日 16:49
2
Can you give your custom header links settings please ?
Stephen
(Stephen)
2019 年3 月 27 日 18:18
3
Sure, they’re:
My Tasks,My Tasks,/latest?assigned=me,vdm,self
and
All Tasks,All Tasks,/latest?assigned=*,vdm,self
1 个赞
j.jaffeux
(Joffrey Jaffeux)
2019 年3 月 28 日 10:00
4
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:
The issue is probably in Discourse itself, I feel like discourse-assign is generating the correct URL, will dig more later.
1 个赞
j.jaffeux
(Joffrey Jaffeux)
2019 年3 月 28 日 10:36
5
6 个赞
Stephen
(Stephen)
2019 年5 月 4 日 15:50
8
This commit:
https://github.com/discourse/discourse-custom-header-links/commit/175a027582eac0b95803b3675ea37faf527ae68c
Reintroduces this bug:
Haven’t been able to pin down whether this is due to a plugin (Assign ) or theme component (Custom Header Links ) 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.
2 个赞