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
- Reviews.
- Write Tests.
User interface changes
None.
API changes
None.
Data model changes
None.