Problem/Motivation

If the user clicks on/users a link for a page that they don't have access too unless they login, they are presented the login page, then the terms of service (legal) page, but then they are rerouted back to the home page.

So, ultimately, a user clicks on a link like https://example.com/this/page, but then, after logging in, is sent to https://example.com

Steps to reproduce

Install the legal module.
In the configuration, under "Display Style Login", set it to "HTML Text".
Attempt to access a page that you would need to be logged in for, login, and see that you're sent back to the home page

Proposed resolution

Ideally, when the site redirects them to the terms of service (legal) agreement page, it preserves the originally intended path through with the destination query parameter

Remaining tasks

User interface changes

API changes

Data model changes

Comments

UnsettlingTrend created an issue. See original summary.

anybody’s picture

Version: 2.0.0 » 2.0.x-dev

I agree this should be fixed and is a bug.

anybody’s picture

anybody’s picture

Version: 2.0.x-dev » 3.0.x-dev

Several issues seem to document this, I think we should close all but one and sum up things there?

anybody’s picture

Assigned: unsettlingtrend » Unassigned
robert castelo’s picture

Status: Active » Postponed (maintainer needs more info)

The Drupal out of the box behaviour (without Legal) is that when a user visits a page and gets a 404 if they click on the login link they go to the login page and submit their details, they are then redirected to their account page.

@UnsettlingTrend is your site redirecting back to the page that initially gave a 404? How are you doing that?

Note: if using the User Login block Legal will redirect back to the page that initially gave a 404.