Yeah, this looks like a change in functionality that was not properly refactored. The $modx->sendUnauthorizedPage() and sendErrorPage() functions used to do redirects and append a refurl parameter to the query string. This functionality was changed to avoid the redirect and properly report the response code on the actual url that was accessed, so there is no longer a way to pass this information in the URL. Instead, it needs to be added to the $_REQUEST superglobal. For now, try opening up manager/includes/document.parser.class.inc.php and find the function sendUnauthorizedPage(). Modify that function to look like this:
<?php
function sendUnauthorizedPage() {
// invoke OnPageUnauthorized event
$this->invokeEvent('OnPageUnauthorized');
if ($this->config['unauthorized_page']) {
$unauthorizedPage= $this->config['unauthorized_page'];
} elseif ($this->config['error_page']) {
$unauthorizedPage= $this->config['error_page'];
} else {
$unauthorizedPage= $this->config['site_start'];
}
// $this->sendRedirect($this->makeUrl($this->config['unauthorized_page'], '', '&refurl=' . urlencode($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'])), 1);
$_REQUEST['refurl']= urlencode($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']);
$this->sendForward($unauthorizedPage, 'HTTP/1.1 401 Unauthorized');
exit();
}
?>
I’m simply adding the line:
$_REQUEST['refurl']= urlencode($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']);
right before the call to sendForward() in order to set this variable properly for the weblogin snippet logic. This should re-enable the expected behavior.
Let me know if that works for you or not.