contextual.js overrides any destination query param set earlier

Created on 25 July 2018, almost 7 years ago
Updated 4 September 2024, 8 months ago

Problem/Motivation

contextual.js adds a fixed destination query string param to the end of the URL even if it already contains a destination param set earlier, e.g. in a hook. The result with two destination params does not look correct and apparently the last destination takes priority over any others which makes it effectively impossible to set an alternative destination in a hook.

Proposed resolution

Fix contextual.js to only add a destination when one has not been already added to the URL.

Remaining tasks

* Ideally combine the change with 🐛 contextual.js produces an undesireable URL when a contextual link has a fragment in it Needs work as it fixes another bug in the same code.
* Write a test - unfortunately have no skills to do that

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Contextual 

Last updated about 6 hours ago

Created by

🇷🇺Russia marassa Moscow

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024