Redirects performed while a wrapper format is active loses the wrapper format, hence breaking AJAX, Dialogs, RefreshLess

Created on 27 April 2016, over 8 years ago
Updated 27 January 2023, over 1 year ago

Problem/Motivation

Discovered in #2704075: Clicking the "My account" main menu link results in JS errors and nothing happening β†’ .

Suppose you make a request:

HTTP GET http://drupal/user?_wrapper_format=drupal_dialog

… then UserController::userPage() will send a redirect response. But rather than persisting the _wrapper_format query string, it will lose it. Which means you'll get a HTML response rather than a Drupal dialog response! Bam, everything is broken.

Note that JS can't do anything about this: such redirects are handled in the browser, before JS can even see the redirect.

Proposed resolution

Persist the wrapper format querystring.

Remaining tasks

  1. Reviews.
  2. Write Tests.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
RenderΒ  β†’

Last updated 7 days ago

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
  • Contributed project blocker

    It denotes an issue that prevents porting of a contributed project to the stable version of Drupal due to missing APIs, regressions, and so on.

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