Problem/Motivation

MyrestRedirectEventSubscriber::onRedirectToDefaultLanguage() rewrites redirects that carry a language prefix, which was written for the node add forms of one site. It runs for every response of the site that is a redirect, so on any other site it changes the behaviour of forms and workflows this module knows nothing about. It is the third of the three redirect behaviours; the other two are already behind settings.

Proposed resolution

  • Add redirect_admin_forms_to_default_language to the same "Redirects for a headless back end" section, default off.
  • Scope it to the routes it was written for rather than to every redirect response, and guard it with isMainRequest() like its siblings.
  • Update hook that switches it on for existing sites, the same way it was done for the node redirect.
  • Functional coverage of both states.

Remaining tasks

Everything.

Issue fork myrest-3618436

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sergeydruua created an issue. See original summary.

  • sergeydruua committed b038b79f on 1.0.x
    Issue #3618436: Put the add form language redirect behind its own scope...
sergeydruua’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sergeydruua’s picture

Status: Fixed » Closed (fixed)