Stay in the same language when unlocking content

Created on 25 May 2022, over 2 years ago
Updated 21 March 2024, 7 months ago

Problem/Motivation

When using multiple languages, while you're working on a translation of a node and when you try to unlock that node, you're being redirect to the original language of the node, and not the language in which you're working at the moment

Steps to reproduce

* Setup
** Enable language and content translation
** Add an extra language

* Steps
** Create a node in the default language and translate it
** Go to the page in the translated version and edit the translation and on the bottom press 'Unlock'
** Confirm the break lock, now you're being redirect to the language of the original node, not the language you were browsing in

Proposed resolution

* Stay in the language that you're currently browsing in while unlocking content

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium brentg Ghent

Live updates comments and jobs are added and updated live.
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.

  • First commit to issue fork.
  • Status changed to RTBC 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Turned to an MR and fixed a minor PHPCS.

  • First commit to issue fork.
  • Status changed to Needs work 7 months ago
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    The test is not actually running and is broken once it is... pushed a commit showing this.

  • Status changed to Postponed: needs info 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    So I tried replicating on latest changes and when I break lock from /de/node/2/edit I end up on /de/node/2

    Maybe this fixed somewhere else?

  • Status changed to Needs review 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Still can't replicate so reverted the change but added test coverage to show.

  • πŸ‡ΊπŸ‡¦Ukraine AstonVictor

    I guess it's only possible to reproduce it if the user has the URL in the next format - /{LANG}/node/{ID}/edit?destination=/node/{ID}.
    So, the EntityBreakLockForm::submitForm() will redirect the user to the destination parameter instead of the entity page.

    please, check your query parameters. probably, you have another module or custom code for adding query parameters to some pages.

    thanks

Production build 0.71.5 2024