リンクの動作が不安定

この問題がプラグイン(Assign)かテーマコンポーネント(Custom Header Links)のどちらに起因するものか特定できていませんが、どちらも公式のものなので、半分ずつ折衷して #contribute:bug として報告することにしました。

新規インスタンスで、これらのコンポーネントのみがインストールされています。Header Links は、Assign が「自分宛て」「全員宛て」などのトップメニューオプションを追加しないため、必要です。

これらのリンクのいずれかを初めてクリックすると、正しい割り当て済み投稿が表示されます。しかし、もう一方のリンクをクリックした後、または同じリンクを2回クリックすると、URL が /latest?assigned=me/latest?assigned=* から /latest に切り替わり、結果として間違った投稿が返されます。

つまり、/ から「My Tasks」をクリックして /latest?assigned=me に遷移した後、「All Tasks」をクリックしても、期待される /latest?assigned=* ではなく /latest にリダイレクトされます。また、すでにどちらかのページにいる状態でリンクを再度クリックしても、/latest にリダイレクトされます。

v2.3.0.beta5 +200

Can you give your custom header links settings please ?

Sure, they’re:

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

and

All Tasks,All Tasks,/latest?assigned=*,vdm,self
「いいね!」 1

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

I ended up doing two commits:

https://github.com/discourse/discourse-custom-header-links/commit/bfda9d3b50bd8e027024b62aa0b7e68611248073

https://github.com/discourse/discourse-assign/commit/046f1db466d3f6e01a41217c8593001dc66b21ce

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

「いいね!」 6

This commit:

https://github.com/discourse/discourse-custom-header-links/commit/175a027582eac0b95803b3675ea37faf527ae68c

Reintroduces this bug:

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