Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 297360

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

$
0
0

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.


Viewing all articles
Browse latest Browse all 297360

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>