When we click the login link and are taken to the login page, after completing the login process we should be taken back to the page where we previously were, rather than the home page.
Description
Revisions and Commits
Event Timeline
If my test is correct, you are sent to the homepage after logging in, regardless of where you were before.
I don't recall where, but I have also seen this request in our Wikimedia instance. MediaWiki does leave you in the page you were before logging in, so this is the expectation there as well.
I think which link "the login link" is matters.
If you hit a page you need to login for, the login form appears directly on the page and works (you end up on that page logged in and not the home page.)
"The login link" maybe refers to the link in the upper right. I'd guess user scenarios are things like "not logged in yet and browsing the many public tasks and want to comment so click the login link..."
Can people hitting this elucidate as exactly as possible which link(s) they are clicking?
- In PhabricatorAuthApplication->buildMainMenuItems(), add ?next=<the current path> to the "Log In" item.
Something like this:
$uri = new PhutilURI('/auth/start/'); if ($controller) { $path = $controller->getRequest()->getPath(); $uri->setQueryParam('next', $path); } // ... ->setHref($uri); // ...
To test:
- Enable policy.allow-public.
- View some public object, like a task.
- Click the login link.
- After logging in, you should be taken back to the task page.